diff --git a/src/comms.cpp b/src/comms.cpp index b121294..6bba257 100644 --- a/src/comms.cpp +++ b/src/comms.cpp @@ -352,7 +352,7 @@ void XDRGTKRoutine() { case 'T': unsigned int freqtemp; freqtemp = atoi(buff + 1); - if (BAND_FM) freqtemp -= ConverterSet * 1000; + if (BAND_FM) freqtemp -= ConverterSet * 1000; if (seek) seek = false; if (freqtemp >= LWLowEdgeSet && freqtemp <= LWHighEdgeSet) { frequency_LW = freqtemp; @@ -574,7 +574,7 @@ void XDRGTKRoutine() { DataPrint("Sm"); } } - DataPrint(String(((SStatus * 100) + 10875) / 1000) + "." + String(((SStatus * 100) + 10875) / 100 % 10) + ", " + String(WAM / 10) + ", " + String(CN) + "\n"); + DataPrint(String(((SStatus * 100) + 10875) / 1000) + "." + String(((SStatus * 100) + 10875) / 100 % 10) + "," + String(WAM / 10) + "," + String(CN) + "\n\n"); } void passwordcrypt() { @@ -616,5 +616,4 @@ void tryWiFi() { Server.end(); Udp.stop(); WiFi.mode(WIFI_OFF); - } -} \ No newline at end of file + } \ No newline at end of file diff --git a/src/constants.h b/src/constants.h index 36fb5cd..21d826a 100644 --- a/src/constants.h +++ b/src/constants.h @@ -110,7 +110,7 @@ #define SW_MI_BAND_160M 160 //MAIN COLORS /* RGB 565 CODES */ -#define Black 0x0000 /* 0, 0, 0 */ +#define Black 0x0000 /* 0, 0, 0 */ #define Blue 0x001F /* 0, 0, 31 */ #define Cabbage 0x07F6 /* 0, 63, 22 */ #define Coral 0xFBEF /* 31, 31, 15 */ @@ -515,4 +515,4 @@ static const uint8_t WiFi4[] PROGMEM = { 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 -}; +}; \ No newline at end of file diff --git a/src/rds.cpp b/src/rds.cpp index 42302b8..b2f0aa5 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -403,24 +403,9 @@ void readRds() { } if ((RDSstatus && XDRGTKUSB) || (RDSstatus && XDRGTKTCP)) { - - uint8_t piError = radio.rds.rdsErr >> 14; - if (piError < 3) { - uint8_t piState = radio.rds.piBuffer.add(radio.rds.rdsA, piError); - - if (piState != RdsPiBuffer::STATE_INVALID) { - DataPrint ("P"); - DataPrint (String(((radio.rds.rdsA >> 8) >> 4) & 0xF, HEX) + String((radio.rds.rdsA >> 8) & 0xF, HEX)); - DataPrint (String(((radio.rds.rdsA) >> 4) & 0xF, HEX) + String((radio.rds.rdsA) & 0xF, HEX)); - while (piState != 0) { - DataPrint("?"); - piState--; - } - DataPrint ("\n"); - } - } - XDRGTKRDS = "R"; + XDRGTKRDS += String(((radio.rds.rdsA >> 8) >> 4) & 0xF, HEX) + String((radio.rds.rdsA >> 8) & 0xF, HEX); + XDRGTKRDS += String(((radio.rds.rdsA) >> 4) & 0xF, HEX) + String((radio.rds.rdsA) & 0xF, HEX); XDRGTKRDS += String(((radio.rds.rdsB >> 8) >> 4) & 0xF, HEX) + String((radio.rds.rdsB >> 8) & 0xF, HEX); XDRGTKRDS += String(((radio.rds.rdsB) >> 4) & 0xF, HEX) + String((radio.rds.rdsB) & 0xF, HEX); XDRGTKRDS += String(((radio.rds.rdsC >> 8) >> 4) & 0xF, HEX) + String((radio.rds.rdsC >> 8) & 0xF, HEX); @@ -438,6 +423,21 @@ void readRds() { XDRGTKRDS += "\n"; if (XDRGTKRDS != XDRGTKRDSold) { + uint8_t piError = radio.rds.rdsErr >> 14; + if (piError < 3) { + uint8_t piState = radio.rds.piBuffer.add(radio.rds.rdsA, piError); + + if (piState != RdsPiBuffer::STATE_INVALID) { + DataPrint ("P"); + DataPrint (String(((radio.rds.rdsA >> 8) >> 4) & 0xF, HEX) + String((radio.rds.rdsA >> 8) & 0xF, HEX)); + DataPrint (String(((radio.rds.rdsA) >> 4) & 0xF, HEX) + String((radio.rds.rdsA) & 0xF, HEX)); + while (piState != 0) { + DataPrint("?"); + piState--; + } + DataPrint ("\n"); + } + } DataPrint(XDRGTKRDS); XDRGTKRDSold = XDRGTKRDS; }