Added support for extended frequency range with XDR-GTK

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-01-27 15:02:24 +01:00
parent de83b31f4e
commit 18a9f6595b
3 changed files with 8 additions and 5 deletions

View File

@@ -771,7 +771,7 @@ void loop() {
afmethodBold = true;
radio.clearRDS(fullsearchrds);
}
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String(frequency * 10));
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String((frequency + ConverterSet * 100) * 10));
store = true;
}
}
@@ -788,7 +788,7 @@ void loop() {
afmethodBold = true;
radio.clearRDS(fullsearchrds);
}
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String(frequency * 10));
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String((frequency + ConverterSet * 100) * 10));
store = true;
}
}
@@ -804,7 +804,7 @@ void loop() {
afmethodBold = true;
radio.clearRDS(fullsearchrds);
}
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String(frequency * 10));
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String((frequency + ConverterSet * 100) * 10));
store = true;
}
}

View File

@@ -341,7 +341,7 @@ void XDRGTKRoutine() {
SelectBand();
}
DataPrint("M0\n");
DataPrint("T" + String(frequency * 10) + "\n");
DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n");
radio.SetFreq(frequency);
radio.clearRDS(fullsearchrds);
RDSstatus = false;
@@ -352,6 +352,7 @@ void XDRGTKRoutine() {
case 'T':
unsigned int freqtemp;
freqtemp = atoi(buff + 1);
if (BAND_FM) freqtemp -= ConverterSet * 1000;
if (seek) seek = false;
if (freqtemp >= LWLowEdgeSet && freqtemp <= LWHighEdgeSet) {
frequency_LW = freqtemp;
@@ -396,7 +397,8 @@ void XDRGTKRoutine() {
radio.SetFreq(frequency);
DataPrint("M0\n");
}
if (band == BAND_FM) DataPrint("T" + String(frequency * 10) + "\n"); else DataPrint("T" + String(frequency_AM) + "\n");
if (band == BAND_FM) DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n"); else DataPrint("T" + String(frequency_AM) + "\n");
ShowFreq(0);
radio.clearRDS(fullsearchrds);
RDSstatus = false;

View File

@@ -82,6 +82,7 @@ extern uint16_t USN;
extern uint16_t WAM;
extern uint8_t buff_pos;
extern int8_t CN;
extern unsigned int ConverterSet;
extern unsigned int freq_scan;
extern unsigned int frequency;
extern unsigned int frequency_OIRT;