You've already forked TEF6686_ESP32
Improved TMC detection
This commit is contained in:
@@ -2722,8 +2722,11 @@ void doTuneMode() {
|
||||
switch (tunemode) {
|
||||
case TUNE_MAN:
|
||||
if (band == BAND_SW) {
|
||||
if (showSWMIBand && nowToggleSWMIBand) tunemode = TUNE_MI_BAND;
|
||||
else tunemode = TUNE_AUTO;
|
||||
if (showSWMIBand && nowToggleSWMIBand) {
|
||||
tunemode = TUNE_MI_BAND;
|
||||
} else {
|
||||
tunemode = TUNE_AUTO;
|
||||
}
|
||||
} else {
|
||||
tunemode = TUNE_AUTO;
|
||||
}
|
||||
@@ -2733,6 +2736,7 @@ void doTuneMode() {
|
||||
ShowStepSize();
|
||||
}
|
||||
break;
|
||||
|
||||
case TUNE_MI_BAND:
|
||||
case TUNE_AUTO:
|
||||
tunemode = TUNE_MEM;
|
||||
@@ -2754,12 +2758,10 @@ void ShowTuneMode() {
|
||||
case TUNE_MAN:
|
||||
if (band == BAND_SW && nowToggleSWMIBand) {
|
||||
tftPrint(0, "AUTO", 22, 60, BackgroundColor, BackgroundColor, 16);
|
||||
|
||||
tft.drawRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
||||
tftPrint(0, "BAND", 22, 60, GreyoutColor, BackgroundColor, 16);
|
||||
} else {
|
||||
tftPrint(0, "BAND", 22, 60, BackgroundColor, BackgroundColor, 16);
|
||||
|
||||
tft.drawRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
||||
tftPrint(0, "AUTO", 22, 60, GreyoutColor, BackgroundColor, 16);
|
||||
}
|
||||
|
||||
@@ -618,6 +618,8 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
}
|
||||
}
|
||||
|
||||
if (rds.rdsC >> 12 == 1) rds.hasTMC = true; // TMC flag
|
||||
|
||||
if (!rdsDerrorThreshold) {
|
||||
if (rds.rdsD != 0) { // PIN decoder
|
||||
rds.hasPIN = true;
|
||||
@@ -812,7 +814,7 @@ void TEF6686::readRDS(byte showrdserrors)
|
||||
rds.RTContent2 = convertToUTF8(RTtext2); // Convert RDS characterset to ASCII
|
||||
rds.RTContent2 = extractUTF8Substring(rds.RTContent2, 0, 44, false); // Make sure RT does not exceed 32 characters
|
||||
}
|
||||
if (!rdsBerrorThreshold && rdsblock == 16 && (rds.rdsB & (1 << 4))) rds.hasTMC = true; // TMC flag
|
||||
if (!rdsBerrorThreshold && rdsblock == 16 && (bitRead(rds.rdsB, 15))) rds.hasTMC = true; // TMC flag
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user