diff --git a/TEF6686_ESP32.ino b/TEF6686_ESP32.ino index aa00078..964e9a4 100644 --- a/TEF6686_ESP32.ino +++ b/TEF6686_ESP32.ino @@ -284,6 +284,8 @@ String salt; String saltkey = " "; String stationIDold; String stationStateold; +String StereoStatusCommand; +String StereoStatusCommandold; String SWMIBandstring = String(); String SWMIBandstringold = String(); String XDRGTK_key; @@ -348,6 +350,7 @@ unsigned long rtplusticker; unsigned long rtplustickerhold; unsigned long rtticker; unsigned long rttickerhold; +unsigned long signalstatustimer; unsigned long tottimer; unsigned long tuningtimer; unsigned long udptimer; diff --git a/src/Tuner_Interface.cpp b/src/Tuner_Interface.cpp index 8796d9a..1009fc4 100644 --- a/src/Tuner_Interface.cpp +++ b/src/Tuner_Interface.cpp @@ -167,6 +167,7 @@ void Tuner_Patch(byte TEF) { void Tuner_I2C_Init() { Wire.begin(); + Wire.setClock(400000); delay(5); } diff --git a/src/comms.cpp b/src/comms.cpp index 90cfab4..981051e 100644 --- a/src/comms.cpp +++ b/src/comms.cpp @@ -568,18 +568,22 @@ void XDRGTKRoutine() { XDRGTKdata = false; } - if (band > BAND_GAP) { - DataPrint("Sm"); - } else { - if (!StereoToggle) { - DataPrint("SS"); - } else if (Stereostatus) { - DataPrint("Ss"); - } else { + if (millis() >= signalstatustimer + 66) { + if (band > BAND_GAP) { DataPrint("Sm"); + } else { + if (!StereoToggle) { + DataPrint("SS"); + } else if (Stereostatus) { + DataPrint("Ss"); + } else { + DataPrint("Sm"); + } } + + DataPrint(String(((SStatus * 100) + 10875) / 1000) + "." + String(((SStatus * 100) + 10875) / 100 % 10) + "," + String(WAM / 10) + "," + String(CN) + "," + String(BW) + "\n\n"); + signalstatustimer = millis(); } - DataPrint(String(((SStatus * 100) + 10875) / 1000) + "." + String(((SStatus * 100) + 10875) / 100 % 10) + "," + String(WAM / 10) + "," + String(CN) + "," + String(BW) + "\n\n"); } void passwordcrypt() { diff --git a/src/comms.h b/src/comms.h index d887f55..ce463b1 100644 --- a/src/comms.h +++ b/src/comms.h @@ -75,6 +75,8 @@ extern IPAddress remoteip; extern String cryptedpassword; extern String salt; extern String saltkey; +extern String StereoStatusCommand; +extern String StereoStatusCommandold; extern String XDRGTK_key; extern uint16_t BW; extern uint16_t MStatus; @@ -101,6 +103,7 @@ extern unsigned int scanner_step; extern unsigned int SWHighEdgeSet; extern unsigned int SWLowEdgeSet; extern unsigned long aftimer; +extern unsigned long signalstatustimer; extern TFT_eSPI tft; extern TEF6686 radio; diff --git a/src/rds.cpp b/src/rds.cpp index 0a31788..30c0c6d 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -288,8 +288,8 @@ void showECC() { } void readRds() { - radio.readRDS(showrdserrors); if (band < BAND_GAP) { + radio.readRDS(showrdserrors); RDSstatus = radio.rds.hasRDS; ShowRDSLogo(RDSstatus); if (!screenmute && !afscreen) {