diff --git a/src/TEF6686.cpp b/src/TEF6686.cpp index 84c66e7..724171d 100644 --- a/src/TEF6686.cpp +++ b/src/TEF6686.cpp @@ -123,7 +123,6 @@ uint16_t TEF6686::TestAF() { af[y].frequency = 0; af[y].score = -32767; af[y].afvalid = true; - af[y].filler = false; af[y].checked = false; } af_counter = 0; // Reset af_counter only once after the loop. @@ -552,7 +551,6 @@ void TEF6686::readRDS(bool showrdserrors) if (!isValuePresent) { af[af_counter].frequency = buffer0; - if ((rds.rdsC & 0xFF) == 205) af[af_counter].filler = true; af_counter++; } @@ -575,15 +573,12 @@ void TEF6686::readRDS(bool showrdserrors) if (af[j].frequency > af[j + 1].frequency && af[j + 1].frequency != 0) { uint16_t temp = af[j].frequency; - bool temp2 = af[j].filler; bool temp3 = af[j].afvalid; bool temp4 = af[j].checked; af[j].frequency = af[j + 1].frequency; - af[j].filler = af[j + 1].filler; af[j].afvalid = af[j + 1].afvalid; af[j].checked = af[j + 1].checked; af[j + 1].frequency = temp; - af[j + 1].filler = temp2; af[j + 1].afvalid = temp3; af[j + 1].checked = temp4; } @@ -906,7 +901,6 @@ void TEF6686::clearRDS (bool fullsearchrds) for (i = 0; i < 50; i++) { af[i].frequency = 0; af[i].score = -32767; - af[i].filler = false; af[i].afvalid = true; af[i].checked = false; } diff --git a/src/TEF6686.h b/src/TEF6686.h index 840390b..6f15c1d 100644 --- a/src/TEF6686.h +++ b/src/TEF6686.h @@ -172,7 +172,6 @@ typedef struct _rds_ { typedef struct _af_ { uint16_t frequency; int16_t score; - bool filler; bool afvalid; bool checked; } af_; diff --git a/src/rds.cpp b/src/rds.cpp index 4f08e65..fa1f0a3 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -90,7 +90,7 @@ void ShowAdvancedRDS() { } String afstring; - if (radio.rds.hasAF) for (byte i = 0; i < radio.af_counter; i++) afstring += String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10) + (radio.af[i].filler ? "(f)" : "") + (i == radio.af_counter - 1 ? " " : " | "); else afstring = myLanguage[language][87]; + if (radio.rds.hasAF) for (byte i = 0; i < radio.af_counter; i++) afstring += String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10) + (i == radio.af_counter - 1 ? " " : " | "); else afstring = myLanguage[language][87]; if (hasafold != radio.rds.hasAF) { if (radio.rds.hasAF) tftPrint(-1, "AF", 47, 51, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(-1, "AF", 47, 51, GreyoutColor, BackgroundColor, 16); hasafold = radio.rds.hasAF; @@ -779,11 +779,11 @@ void ShowAFEON() { for (byte i = 0; i < radio.af_counter; i++) { byte x = i - (afpagenr == 2 ? 30 : 0); if (radio.af[i].checked) { - tftPrint(1, (radio.af[i].filler ? "f " : "") + String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 50 + (x > 9 ? 54 : 0) + (x > 19 ? 54 : 0), 48 + (15 * x) - (x > 9 ? 150 : 0) - (x > 19 ? 150 : 0), InsignificantColor, InsignificantColorSmooth, 16); + tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 50 + (x > 9 ? 54 : 0) + (x > 19 ? 54 : 0), 48 + (15 * x) - (x > 9 ? 150 : 0) - (x > 19 ? 150 : 0), InsignificantColor, InsignificantColorSmooth, 16); } else if (!radio.af[i].afvalid) { - tftPrint(1, (radio.af[i].filler ? "f " : "") + String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 50 + (x > 9 ? 54 : 0) + (x > 19 ? 54 : 0), 48 + (15 * x) - (x > 9 ? 150 : 0) - (x > 19 ? 150 : 0), SignificantColor, SignificantColorSmooth, 16); + tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 50 + (x > 9 ? 54 : 0) + (x > 19 ? 54 : 0), 48 + (15 * x) - (x > 9 ? 150 : 0) - (x > 19 ? 150 : 0), SignificantColor, SignificantColorSmooth, 16); } else { - tftPrint(1, (radio.af[i].filler ? "f " : "") + String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 50 + (x > 9 ? 54 : 0) + (x > 19 ? 54 : 0), 48 + (15 * x) - (x > 9 ? 150 : 0) - (x > 19 ? 150 : 0), PrimaryColor, PrimaryColorSmooth, 16); + tftPrint(1, String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10), 50 + (x > 9 ? 54 : 0) + (x > 19 ? 54 : 0), 48 + (15 * x) - (x > 9 ? 150 : 0) - (x > 19 ? 150 : 0), PrimaryColor, PrimaryColorSmooth, 16); } if (i == 29 + (afpagenr == 2 ? 30 : 0)) i = 254; }