diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index c5dd4bb..f69a13c 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -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; } } diff --git a/src/comms.cpp b/src/comms.cpp index e39379c..b121294 100644 --- a/src/comms.cpp +++ b/src/comms.cpp @@ -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; diff --git a/src/comms.h b/src/comms.h index a6ea0a0..d887f55 100644 --- a/src/comms.h +++ b/src/comms.h @@ -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;