why did it use a static string to signal pty change?

This commit is contained in:
2026-01-05 21:27:57 +01:00
parent 8d76a0054f
commit 7408bd9eac
10 changed files with 67 additions and 101 deletions
+3 -3
View File
@@ -526,8 +526,8 @@ void showPI() {
}
void showPTY() {
if (strcmp(radio.rds.stationType, programTypePrevious)) {
String PTYString = String(radio.rds.PTY) + "/" + (radio.rds.region != 0 ? radio.rds.stationType : textUI(228 + radio.rds.PTY));
if(radio.rds.PTY != programTypePrevious) {
String PTYString = String(radio.rds.PTY) + "/" + (radio.rds.region != 0 ? (radio.rds.region == 0 ? PTY_EU[radio.rds.PTY] : PTY_USA[radio.rds.PTY]) : textUI(228 + radio.rds.PTY));
if (radio.rds.PTY == 32) PTYString = "";
@@ -548,7 +548,7 @@ void showPTY() {
Udp.print(String(radio.rds.PTY, HEX));
Udp.endPacket();
}
strcpy(programTypePrevious, radio.rds.stationType);
programTypePrevious = radio.rds.PTY;
}
}