Fixed SA levels, formatting
Also reduced timeouts for TG SI4432
This commit is contained in:
parent
96a27b6005
commit
d23e726c8b
@ -143,9 +143,9 @@ void doSigGenLow ()
|
||||
uint16_t attenuation = sigGenSetting.Calibration - sigGenSetting.Power;
|
||||
if (attenuation > ATTENUATOR_RANGE )
|
||||
{
|
||||
int16_t diff = sigGenSetting.Calibration - ATTENUATOR_RANGE - sigGenSetting.Power;
|
||||
sgRXDrive = RX_SI4432_MAX_DRIVE - (int16_t)(diff/3) ;
|
||||
attenuation = ATTENUATOR_RANGE - diff%3;
|
||||
int16_t diff = attenuation - ATTENUATOR_RANGE;
|
||||
sgRXDrive = RX_SI4432_MAX_DRIVE - (int16_t)( (diff-1)/3 ) - 1 ;
|
||||
attenuation = ATTENUATOR_RANGE - 2 + (diff-1)%3;
|
||||
}
|
||||
SetSGRxDrive(sgRXDrive);
|
||||
att.SetAtten(attenuation);
|
||||
|
2
cmd.cpp
2
cmd.cpp
@ -204,7 +204,7 @@ int msgCount = ELEMENTS ( msgTable);
|
||||
|
||||
void ShowMenu ()
|
||||
{
|
||||
Serial.printf ( "\nTiny Spectrum Analyzer Version %s - User Commands:\n\n", PROGRAM_VERSION );
|
||||
Serial.printf ( "\nsimpleSA Spectrum Analyzer %s - User Commands:\n\n", PROGRAM_VERSION );
|
||||
Serial.println ( "Sweep Settings:\n" );
|
||||
|
||||
Serial.print ( " START.........Sweep start frequency, currently: " );
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>[TinySA]</title>
|
||||
<title>[simpleSA]</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css" media="all" />
|
||||
|
||||
<meta charset="UTF-8">
|
||||
@ -46,18 +46,18 @@
|
||||
<h1>About</h1>
|
||||
|
||||
<p style="max-width:700px;">
|
||||
The TinySA has been developed by Erik PD0EK.
|
||||
This version has been adapted to run on the ESP32 DevKit module by Dave M0WID and John WA2FZW.
|
||||
This simpleSA running on an ESP32 has been adapted by Dave M0WID and John WA2FZW.<br />
|
||||
It was based on an early prototype design of the TinySA by Erik PD0EK.<br />
|
||||
Information can be found at <a href = "https://groups.io/g/HBTE">https://groups.io/g/HBTE</a>
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
<form method="get" action="/doReboot">
|
||||
To reboot click <button style="background-color: red; color: white;"
|
||||
onclick="return confirm('Are you sure?')" type="submit">here</button>
|
||||
</form>
|
||||
<form method="get" action="/doReboot">
|
||||
To reboot click <button style="background-color: red; color: white;"
|
||||
onclick="return confirm('Are you sure?')" type="submit">here</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id=footer>Copyright © <span id="programCopyright"></span></div>
|
||||
<div id=footer>Copyright © <span id="programCopyright">M0WID and WA2FZW</span></div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -60,6 +60,8 @@
|
||||
<div class="sigTitle">Signal Generator</div>
|
||||
<br />
|
||||
<div class="sigFreq">
|
||||
<button class = "inc-button" id="incButton">+</button>
|
||||
<br />
|
||||
<label for="setSigGenFreq8" class="sigFreqLabel">Frequency:</label>
|
||||
<input class="sigFreqInput" id="setSigGenFreq8" name="setSigGenFreq8" type="number" min=-1 max=10 value=0>
|
||||
<input class="sigFreqInput" id="setSigGenFreq7" name="setSigGenFreq7" type="number" min=-1 max=10 value=0>
|
||||
@ -72,10 +74,10 @@
|
||||
<input class="sigFreqInput" id="setSigGenFreq2" name="setSigGenFreq2" type="number" min=-1 max=10 value=0>
|
||||
<input class="sigFreqInput" id="setSigGenFreq1" name="setSigGenFreq1" type="number" min=-1 max=10 value=0>
|
||||
<input class="sigFreqInput" id="setSigGenFreq0" name="setSigGenFreq0" type="number" min=0 max=10 value=0>
|
||||
<span class="sigFreqText">Hz</span>
|
||||
<button class = "set-button" id="incButton">+</button>
|
||||
<button class = "set-button" id="decButton">-</button>
|
||||
<button class = "set-button" id="sigOnButton">On/Off</button>
|
||||
<span class="sigFreqText">Hz </span>
|
||||
<button class = "on-button" id="sigOnButton">On/Off</button>
|
||||
<br />
|
||||
<button class = "inc-button" id="decButton">-</button>
|
||||
|
||||
|
||||
</div>
|
||||
@ -217,10 +219,9 @@
|
||||
<br />
|
||||
<div id="signal_info">
|
||||
<div class="setting" >
|
||||
<label class="setting-label">Points:</label>
|
||||
<input class="value-display" type="text" disabled="1" id="sweepPoints" size="1" value="65000" />
|
||||
<label class="setting-label">Time:</label>
|
||||
<input class="value-display" type="text" disabled="1" id="sweepTime" size="1" value="290" />
|
||||
<input class="sweep-display" type="text" disabled="1" id="sweepPoints" size="1" value="65000" />
|
||||
pts
|
||||
<input class="sweep-display" type="text" disabled="1" id="sweepTime" size="1" value="290" />
|
||||
ms
|
||||
</div>
|
||||
</div>
|
||||
@ -244,7 +245,7 @@
|
||||
dB
|
||||
</div>
|
||||
<div class="setting" >
|
||||
<button class = "set-button" type="submit" id="setActPower">Set Actual</button>
|
||||
<button id="setActPower">Set Actual</button>
|
||||
<input class="value-input" type="number" id="setPowerValue" placeholder="setPowerValue" maxlength = "9" min="-60" max="20" value="0" />
|
||||
dBm
|
||||
</div>
|
||||
@ -322,8 +323,9 @@
|
||||
<div style="width: 100px; display: inline-block">Pings:
|
||||
<input type="text" id="connectionPings" size="3" value="-" style="border: 0" />
|
||||
</div>
|
||||
<div style="width: 100px; display: inline-block">Refresh Interval:
|
||||
<div style="width: 160px; display: inline-block">Refresh:
|
||||
<input class="value-input" type="number" id="refreshInterval" size="3" min="100" max="3000" value="500" />
|
||||
ms
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -525,7 +527,7 @@ var chartSA = new CanvasJS.Chart("chartSA",
|
||||
},
|
||||
axisY:
|
||||
{
|
||||
title: "dB",
|
||||
title: "dBm",
|
||||
titleFontSize: 24,
|
||||
gridThickness: 1,
|
||||
gridColor: "WhiteSmoke",
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
.norm {
|
||||
width: 100%;
|
||||
width: 95%;
|
||||
height: 3vh;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin-top: 5px;
|
||||
@ -127,6 +127,14 @@ input[type="number"] {
|
||||
background-color: lightgrey;
|
||||
}
|
||||
|
||||
.sweep-display {
|
||||
border: 0;
|
||||
text-align: right;
|
||||
width: 65px;
|
||||
display: inline-block;
|
||||
background-color: lightgrey;
|
||||
}
|
||||
|
||||
.message-display {
|
||||
border: 0;
|
||||
text-align: left;
|
||||
@ -156,7 +164,7 @@ input[type="number"] {
|
||||
border: solid 1px grey;
|
||||
text-align: right;
|
||||
text-align-last: right;
|
||||
width: 75px;
|
||||
width: 77px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@ -181,10 +189,22 @@ input[type="number"] {
|
||||
text-align-last: left;
|
||||
}
|
||||
|
||||
.set-button {
|
||||
.inc-button {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
font-size: 14px;
|
||||
background-color: lightgrey;
|
||||
float: right;
|
||||
margin-right:60px;
|
||||
margin-top:3px;
|
||||
}
|
||||
|
||||
.on-button {
|
||||
width: 60px;
|
||||
height: 33px;
|
||||
font-size: 14px;
|
||||
float: right;
|
||||
margin-right:0px;
|
||||
margin-top:3px;
|
||||
}
|
||||
|
||||
.setting {
|
||||
@ -212,6 +232,7 @@ input[type="number"] {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
letter-spacing: -10px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.sigFreqLabel {
|
||||
|
@ -272,7 +272,7 @@ const char* unit[4] = { "RX", "TX", "TGIF", "TGLO" }; // For debugging
|
||||
|
||||
WriteByte ( REG_OFC1, SW_RESET ); // Always perform a system reset
|
||||
|
||||
while ( millis() - startTime < 10000 ) // Try for 10 seconds
|
||||
while ( millis() - startTime < 2000 ) // Try for 2 seconds
|
||||
{
|
||||
regRead = ReadByte ( REG_IS2 );
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
#define PROGRAM_NAME "simpleSA" // These are for the WiFi interface
|
||||
#define PROGRAM_VERSION "0.03" // Current version - beta!
|
||||
#define PROGRAM_VERSION "Version 0.1" // Current version - beta!
|
||||
|
||||
|
||||
/*
|
||||
|
16
simpleSA.ino
16
simpleSA.ino
@ -127,11 +127,20 @@
|
||||
* Additional functions in ui.cmd to allow signed frequency entry.
|
||||
*
|
||||
* Version 3.0f Changes by M0WID
|
||||
*
|
||||
* Version 0.03
|
||||
* renamed simpleSA. Doesn't seem that simple to me!
|
||||
* First go at bandscope mode
|
||||
* VSPI reduced to 10Mhz as some boards will not run at 16MHz
|
||||
* Put onto github - lets see how it works! Version numbering changed - still in beta!
|
||||
*
|
||||
* Version 0.1
|
||||
* Tracking generator now can be used as a signal generator
|
||||
* Web page for signal generator
|
||||
* RX sweep for testing the SI4432 FIR filters
|
||||
* Output range of signal generator increased by also reducing SI4432 output power as well as uing attenuator
|
||||
* Storage feature - temporary only not to disk - added to web page traces
|
||||
* X grid lines added to web chart
|
||||
*/
|
||||
|
||||
|
||||
@ -682,6 +691,8 @@ bool fsStatus = false; // True if SPIFFS loads ok
|
||||
// delay(2);
|
||||
// tgIF_OK = tg_if.Init ( config.tgIF_capacitance );
|
||||
|
||||
tft.setCursor(0,180);
|
||||
tft.println ( "Initializing track gen IF SI4432" );
|
||||
if ( tg_if.Init ( config.tgIF_capacitance ) )
|
||||
{
|
||||
tft.println ("Tracking IF initialised");
|
||||
@ -718,6 +729,9 @@ bool fsStatus = false; // True if SPIFFS loads ok
|
||||
// // Tracking gen LO present - initialise it, but not in TX mode yet
|
||||
// pinMode (SI_TG_LO_CS, OUTPUT);
|
||||
// delay(2);
|
||||
|
||||
tft.println ( "Initializing track gen LO SI4432" );
|
||||
|
||||
tgLO_OK = tg_lo.Init ( config.tgLO_capacitance );
|
||||
if ( tgLO_OK )
|
||||
tft.println ("Tracking LO initialised");
|
||||
@ -814,7 +828,7 @@ bool fsStatus = false; // True if SPIFFS loads ok
|
||||
|
||||
// tft.println("Setup Complete");
|
||||
|
||||
Serial.printf ( "\nTinySA Version %s Initialization Complete\n", PROGRAM_VERSION );
|
||||
Serial.printf ( "\nsimpleSA %s Initialization Complete\n", PROGRAM_VERSION );
|
||||
|
||||
ShowMenu (); // Display the menu of commands on serial monitor
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define SSID_NAME "TinySA" // Name of access point
|
||||
#define SSID_NAME "simpleSA" // Name of access point
|
||||
|
||||
|
||||
/*
|
||||
|
3
ui.cpp
3
ui.cpp
@ -1171,8 +1171,7 @@ void ShowSplash ( void )
|
||||
tft.setFreeFont ( &FreeSansBold9pt7b ); // Select Free Serif 9 point font
|
||||
tft.drawString ( "By WA2FZW, M0WID,", 160, 60 );
|
||||
tft.drawString ( "VK3PE and G3ZQC", 160, 80 );
|
||||
tft.drawString ( "Version", 160, 100 );
|
||||
tft.drawString ( PROGRAM_VERSION, 220, 100 );
|
||||
tft.drawString ( PROGRAM_VERSION, 160, 100 );
|
||||
tft.drawString ( "Original tinySA by Erik (PD0EK)", 160, 120 );
|
||||
|
||||
tft.setTextDatum ( TL_DATUM ); // Back to default top left
|
||||
|
Loading…
Reference in New Issue
Block a user