Redesign RDS error bars

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-06-04 16:45:54 +02:00
parent e3bcd206c8
commit f0477180b1

View File

@@ -513,80 +513,63 @@ void ShowErrors() {
if (calc != rdsqualityold || BWreset) { if (calc != rdsqualityold || BWreset) {
switch (calc) { switch (calc) {
case 0: case 0:
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, BarInsignificantColor); tft.fillRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, BarInsignificantColor);
tft.fillRoundRect(206, (advancedRDS ? 74 : 186), 2, 23, 2, BarInsignificantColor); tft.fillRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, BarInsignificantColor);
tft.fillRoundRect(193, (advancedRDS ? 84 : 196), 4, 16, 2, BarInsignificantColor);
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, BarInsignificantColor); tft.fillRoundRect(187, (advancedRDS ? 89 : 201), 4, 11, 2, BarInsignificantColor);
tft.fillRoundRect(200, (advancedRDS ? 79 : 191), 2, 18, 2, BarInsignificantColor);
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, BarInsignificantColor);
tft.fillRoundRect(194, (advancedRDS ? 84 : 196), 2, 13, 2, BarInsignificantColor);
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarInsignificantColor);
tft.fillRoundRect(188, (advancedRDS ? 89 : 201), 2, 8, 2, BarInsignificantColor);
break; break;
case 1: case 1:
tft.fillRoundRect(206, (advancedRDS ? 74 : 186), 2, 23, 2, BackgroundColor); tft.fillRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, BackgroundColor);
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor); tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, GreyoutColor);
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, BarInsignificantColor); tft.fillRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, BarInsignificantColor);
tft.fillRoundRect(200, (advancedRDS ? 79 : 191), 2, 18, 2, BarInsignificantColor); tft.fillRoundRect(193, (advancedRDS ? 84 : 196), 4, 16, 2, BarInsignificantColor);
tft.fillRoundRect(187, (advancedRDS ? 89 : 201), 4, 11, 2, BarInsignificantColor);
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, BarInsignificantColor);
tft.fillRoundRect(194, (advancedRDS ? 84 : 196), 2, 13, 2, BarInsignificantColor);
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarInsignificantColor);
tft.fillRoundRect(188, (advancedRDS ? 89 : 201), 2, 8, 2, BarInsignificantColor);
break; break;
case 2: case 2:
tft.fillRoundRect(206, (advancedRDS ? 74 : 186), 2, 23, 2, BackgroundColor); tft.fillRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, BackgroundColor);
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor); tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, GreyoutColor);
tft.fillRoundRect(200, (advancedRDS ? 79 : 191), 2, 18, 2, BackgroundColor); tft.fillRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, BackgroundColor);
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, GreyoutColor); tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, GreyoutColor);
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, BarSignificantColor); tft.fillRoundRect(193, (advancedRDS ? 84 : 196), 4, 16, 2, BarSignificantColor);
tft.fillRoundRect(194, (advancedRDS ? 84 : 196), 2, 13, 2, BarSignificantColor); tft.fillRoundRect(187, (advancedRDS ? 89 : 201), 4, 11, 2, BarSignificantColor);
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarSignificantColor);
tft.fillRoundRect(188, (advancedRDS ? 89 : 201), 2, 8, 2, BarSignificantColor);
break; break;
case 3: case 3:
tft.fillRoundRect(206, (advancedRDS ? 74 : 186), 2, 23, 2, BackgroundColor); tft.fillRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, BackgroundColor);
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor); tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, GreyoutColor);
tft.fillRoundRect(200, (advancedRDS ? 79 : 191), 2, 18, 2, BackgroundColor); tft.fillRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, BackgroundColor);
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, GreyoutColor); tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, GreyoutColor);
tft.fillRoundRect(194, (advancedRDS ? 84 : 196), 2, 13, 2, BackgroundColor); tft.fillRoundRect(193, (advancedRDS ? 84 : 196), 4, 16, 2, BackgroundColor);
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, GreyoutColor); tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 16, 2, GreyoutColor);
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, BarSignificantColor); tft.fillRoundRect(187, (advancedRDS ? 89 : 201), 4, 11, 2, BarSignificantColor);
tft.fillRoundRect(188, (advancedRDS ? 89 : 201), 2, 8, 2, BarSignificantColor);
break; break;
case 4: case 4:
tft.fillRoundRect(206, (advancedRDS ? 74 : 186), 2, 23, 2, BackgroundColor); tft.fillRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, BackgroundColor);
tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 24, 2, GreyoutColor); tft.drawRoundRect(205, (advancedRDS ? 74 : 186), 4, 26, 2, GreyoutColor);
tft.fillRoundRect(200, (advancedRDS ? 79 : 191), 2, 18, 2, BackgroundColor); tft.fillRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, BackgroundColor);
tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 19, 2, GreyoutColor); tft.drawRoundRect(199, (advancedRDS ? 79 : 191), 4, 21, 2, GreyoutColor);
tft.fillRoundRect(194, (advancedRDS ? 84 : 196), 2, 13, 2, BackgroundColor); tft.fillRoundRect(193, (advancedRDS ? 84 : 196), 4, 16, 2, BackgroundColor);
tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 14, 2, GreyoutColor); tft.drawRoundRect(193, (advancedRDS ? 84 : 196), 4, 16, 2, GreyoutColor);
tft.fillRoundRect(188, (advancedRDS ? 89 : 201), 2, 8, 2, BackgroundColor); tft.fillRoundRect(187, (advancedRDS ? 89 : 201), 4, 11, 2, BackgroundColor);
tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 9, 2, GreyoutColor); tft.drawRoundRect(187, (advancedRDS ? 89 : 201), 4, 11, 2, GreyoutColor);
break; break;
} }
rdsqualityold = calc; rdsqualityold = calc;
} }
} }
void showPI() { void showPI() {
if ((region == REGION_US && (String(radio.rds.picode) != PIold || radio.rds.stationIDtext != stationIDold || radio.rds.stationStatetext != stationStateold)) || (region != REGION_US && String(radio.rds.picode) != PIold)) { if ((region == REGION_US && (String(radio.rds.picode) != PIold || radio.rds.stationIDtext != stationIDold || radio.rds.stationStatetext != stationStateold)) || (region != REGION_US && String(radio.rds.picode) != PIold)) {
if (!afscreen && !radio.rds.rdsAerror && !radio.rds.rdsBerror && !radio.rds.rdsCerror && !radio.rds.rdsDerror && radio.rds.rdsA != radio.rds.correctPI && PIold.length() > 1) { if (!afscreen && !radio.rds.rdsAerror && !radio.rds.rdsBerror && !radio.rds.rdsCerror && !radio.rds.rdsDerror && radio.rds.rdsA != radio.rds.correctPI && PIold.length() > 1) {