Fix PI recall in memory mode

Also added PI check on manual entries and updated the doc
This commit is contained in:
Sjef Verhoeven PE5PVB
2024-05-23 20:05:50 +02:00
parent e5250556a6
commit 4cc1987e21
3 changed files with 14 additions and 2 deletions

View File

@@ -2764,9 +2764,11 @@ void DoMemoryPosTune() {
}
if (presets[memorypos].RDSPI[0] != '\0') {
for (byte i = 0; i < 5; i++) {
for (byte i = 0; i < 4; i++) {
radio.rds.picode[i] = presets[memorypos].RDSPI[i];
}
radio.rds.picode[4] = ' ';
radio.rds.picode[5] = ' ';
radio.rds.picode[6] = '\0';
radio.rds.correctPI = (uint16_t)strtol(radio.rds.picode, NULL, 16);
} else {

Binary file not shown.

View File

@@ -258,6 +258,16 @@ void Communication() {
if (memms > 1) error |= (1 << 3);
if (rdsPi[0] != '\0') {
for (int i = 0; i < 4; i++) {
char c = rdsPi[i];
if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))) {
error |= (1 << 5);
break;
}
}
}
if (error == 0) {
error |= (1 << 7);
memorypos = mempos;
@@ -453,7 +463,7 @@ void XDRGTKRoutine() {
if (!screenmute) {
if (!usesquelch) {
tftPrint(-1, "SQ:", 212, 145, BackgroundColor, BackgroundColor, 16);
showAutoSquelch(0);
showAutoSquelch(0);
} else {
Squelch = -150;
}