Compatibility with FM-DX-Webserver

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-01-27 16:57:29 +01:00
parent d448c22140
commit dbf8cf61da
3 changed files with 22 additions and 23 deletions
+3 -4
View File
@@ -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);
}
}
}
+2 -2
View File
@@ -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
};
};
+17 -17
View File
@@ -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;
}