Fixed XDRGTK bandscanner

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-11-06 11:46:00 +01:00
parent 0efa9d349c
commit 508d49927f
3 changed files with 10 additions and 6 deletions

View File

@@ -129,14 +129,15 @@ bool TAold;
bool TPold;
bool touch_detect;
bool tuned;
bool USBmode = 1;
bool XDRGTKMuteScreen;
bool wifi;
bool wificonnected;
bool USBmode;
bool XDRGTKdata;
bool XDRGTKMuteScreen;
bool XDRGTKTCP;
bool XDRGTKUSB;
bool XDRMute;
bool XDRScan;
bool wifi;
bool wificonnected;
byte af_counterold;
byte aid_counterold;
byte af;
@@ -639,7 +640,7 @@ void setup() {
}
tft.invertDisplay(!invertdisplay);
pinMode(BANDBUTTON, INPUT);
pinMode(MODEBUTTON, INPUT);
pinMode(BWBUTTON, INPUT);
@@ -3734,7 +3735,7 @@ void doBW() {
BWsetFM = BWset;
EEPROM.writeByte(EE_BYTE_BWSET_FM, BWsetFM);
if (XDRGTKUSB || XDRGTKTCP) {
if ((XDRGTKUSB || XDRGTKTCP) && !XDRScan) {
switch (BWset) {
case 0: DataPrint("W0\n"); break;
case 1: DataPrint("W56000\n"); break;

View File

@@ -673,6 +673,7 @@ void XDRGTKRoutine() {
case 'S':
if (scandxmode) cancelDXScan();
XDRScan = true;
if (buff[1] == 'a') {
scanner_start = (atol(buff + 2) + 5) / 10;
} else if (buff[1] == 'b') {
@@ -740,6 +741,7 @@ void XDRGTKRoutine() {
SelectBand();
radio.setFMABandw();
BWset = 0;
XDRScan = false;
}
break;

View File

@@ -38,6 +38,7 @@ extern bool XDRGTKdata;
extern bool XDRGTKTCP;
extern bool XDRGTKUSB;
extern bool XDRGTKMuteScreen;
extern bool XDRScan;
extern bool XDRMute;
extern byte band;
extern byte BWset;