Do not filter current frequency in unsorted AF list

When AF sort is disabled, do not remove the current tuned frequency from the list.
This commit is contained in:
Adam Wisher
2023-11-10 13:49:47 +00:00
committed by GitHub
parent 9dd2a45466
commit 2ca82e285a

View File

@@ -703,7 +703,7 @@ void TEF6686::readRDS(byte showrdserrors)
bool isValuePresent = false;
for (int i = 0; i < 50; i++) { // Check if already in list
if ((buffer0 == currentfreq) || buffer0 == 0 || af[i].frequency == buffer0) {
if (rds.sortaf && (buffer0 == currentfreq) || buffer0 == 0 || af[i].frequency == buffer0) {
isValuePresent = true;
break;
}
@@ -717,7 +717,7 @@ void TEF6686::readRDS(byte showrdserrors)
isValuePresent = false;
for (int i = 0; i < 50; i++) { // Check if already in list
if ((buffer1 == currentfreq) || buffer1 == 0 || af[i].frequency == buffer1) {
if (rds.sortaf && (buffer1 == currentfreq) || buffer1 == 0 || af[i].frequency == buffer1) {
isValuePresent = true;
break;
}
@@ -1817,4 +1817,4 @@ void TEF6686::RDScharConverter(const char* input, wchar_t* output, size_t size,
}
}
output[size - 1] = L'\0';
}
}