Removed filler from RDS AF
This commit is contained in:
@@ -123,7 +123,6 @@ uint16_t TEF6686::TestAF() {
|
|||||||
af[y].frequency = 0;
|
af[y].frequency = 0;
|
||||||
af[y].score = -32767;
|
af[y].score = -32767;
|
||||||
af[y].afvalid = true;
|
af[y].afvalid = true;
|
||||||
af[y].filler = false;
|
|
||||||
af[y].checked = false;
|
af[y].checked = false;
|
||||||
}
|
}
|
||||||
af_counter = 0; // Reset af_counter only once after the loop.
|
af_counter = 0; // Reset af_counter only once after the loop.
|
||||||
@@ -552,7 +551,6 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
|
|
||||||
if (!isValuePresent) {
|
if (!isValuePresent) {
|
||||||
af[af_counter].frequency = buffer0;
|
af[af_counter].frequency = buffer0;
|
||||||
if ((rds.rdsC & 0xFF) == 205) af[af_counter].filler = true;
|
|
||||||
af_counter++;
|
af_counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -575,15 +573,12 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
|
|
||||||
if (af[j].frequency > af[j + 1].frequency && af[j + 1].frequency != 0) {
|
if (af[j].frequency > af[j + 1].frequency && af[j + 1].frequency != 0) {
|
||||||
uint16_t temp = af[j].frequency;
|
uint16_t temp = af[j].frequency;
|
||||||
bool temp2 = af[j].filler;
|
|
||||||
bool temp3 = af[j].afvalid;
|
bool temp3 = af[j].afvalid;
|
||||||
bool temp4 = af[j].checked;
|
bool temp4 = af[j].checked;
|
||||||
af[j].frequency = af[j + 1].frequency;
|
af[j].frequency = af[j + 1].frequency;
|
||||||
af[j].filler = af[j + 1].filler;
|
|
||||||
af[j].afvalid = af[j + 1].afvalid;
|
af[j].afvalid = af[j + 1].afvalid;
|
||||||
af[j].checked = af[j + 1].checked;
|
af[j].checked = af[j + 1].checked;
|
||||||
af[j + 1].frequency = temp;
|
af[j + 1].frequency = temp;
|
||||||
af[j + 1].filler = temp2;
|
|
||||||
af[j + 1].afvalid = temp3;
|
af[j + 1].afvalid = temp3;
|
||||||
af[j + 1].checked = temp4;
|
af[j + 1].checked = temp4;
|
||||||
}
|
}
|
||||||
@@ -906,7 +901,6 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
|||||||
for (i = 0; i < 50; i++) {
|
for (i = 0; i < 50; i++) {
|
||||||
af[i].frequency = 0;
|
af[i].frequency = 0;
|
||||||
af[i].score = -32767;
|
af[i].score = -32767;
|
||||||
af[i].filler = false;
|
|
||||||
af[i].afvalid = true;
|
af[i].afvalid = true;
|
||||||
af[i].checked = false;
|
af[i].checked = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,6 @@ typedef struct _rds_ {
|
|||||||
typedef struct _af_ {
|
typedef struct _af_ {
|
||||||
uint16_t frequency;
|
uint16_t frequency;
|
||||||
int16_t score;
|
int16_t score;
|
||||||
bool filler;
|
|
||||||
bool afvalid;
|
bool afvalid;
|
||||||
bool checked;
|
bool checked;
|
||||||
} af_;
|
} af_;
|
||||||
|
|||||||
+4
-4
@@ -90,7 +90,7 @@ void ShowAdvancedRDS() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String afstring;
|
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 (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);
|
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;
|
hasafold = radio.rds.hasAF;
|
||||||
@@ -779,11 +779,11 @@ void ShowAFEON() {
|
|||||||
for (byte i = 0; i < radio.af_counter; i++) {
|
for (byte i = 0; i < radio.af_counter; i++) {
|
||||||
byte x = i - (afpagenr == 2 ? 30 : 0);
|
byte x = i - (afpagenr == 2 ? 30 : 0);
|
||||||
if (radio.af[i].checked) {
|
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) {
|
} 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 {
|
} 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;
|
if (i == 29 + (afpagenr == 2 ? 30 : 0)) i = 254;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user