Bugfixes
This commit is contained in:
+14
-21
@@ -50,7 +50,6 @@ bool artheadold;
|
||||
bool batterydetect = true;
|
||||
bool BWreset;
|
||||
bool change2;
|
||||
bool cleanup;
|
||||
bool compressedold;
|
||||
bool direction;
|
||||
bool dropout;
|
||||
@@ -3160,10 +3159,7 @@ void readRds() {
|
||||
if (advancedRDS) tftPrint(-1, PIold, 244, 75, SecondaryColor, SecondaryColorSmooth, FONT28); else tftPrint(-1, PIold, 244, 187, SecondaryColor, SecondaryColorSmooth, FONT28);
|
||||
if (advancedRDS) tftPrint(-1, PSold, 38, 75, SecondaryColor, SecondaryColorSmooth, FONT28); else tftPrint(-1, PSold, 38, 187, SecondaryColor, SecondaryColorSmooth, FONT28);
|
||||
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, PTYold, 38, 163, SecondaryColor, SecondaryColorSmooth, FONT16);
|
||||
if (!advancedRDS) {
|
||||
sprite.fillSprite(BackgroundColor);
|
||||
sprite.pushSprite(38, 220);
|
||||
} else {
|
||||
if (advancedRDS) {
|
||||
tft.fillCircle(86, 41, 5, SignificantColor);
|
||||
tft.fillCircle(124, 41, 5, SignificantColor);
|
||||
tft.fillCircle(162, 41, 5, SignificantColor);
|
||||
@@ -3671,12 +3667,12 @@ void showPS() {
|
||||
}
|
||||
|
||||
void showRadioText() {
|
||||
if (radio.rds.hasRT && RDSstatus) {
|
||||
if (radio.rds.hasRT && radio.rds.stationText.length() > 0) {
|
||||
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||
xPos = 0;
|
||||
sprite2.fillSprite(BackgroundColor);
|
||||
sprite2.loadFont(FONT16);
|
||||
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
if (RDSstatus) sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else sprite2.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
sprite2.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
sprite2.pushSprite(35, 220);
|
||||
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||
@@ -3684,7 +3680,7 @@ void showRadioText() {
|
||||
xPos = 0;
|
||||
sprite.fillSprite(BackgroundColor);
|
||||
sprite.loadFont(FONT16);
|
||||
sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
if (RDSstatus) sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else sprite.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
sprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
sprite.pushSprite(38, 220);
|
||||
}
|
||||
@@ -3703,26 +3699,20 @@ void showRadioText() {
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 16)) xPos = 0;
|
||||
sprite2.fillSprite(BackgroundColor);
|
||||
sprite2.loadFont(FONT16);
|
||||
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
if (RDSstatus) sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else sprite2.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
sprite2.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
sprite2.pushSprite(35, 220);
|
||||
} else {
|
||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 26)) xPos = 0;
|
||||
sprite.fillSprite(BackgroundColor);
|
||||
sprite.loadFont(FONT16);
|
||||
sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||
if (RDSstatus) sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); else sprite.setTextColor(SecondaryColor, SecondaryColorSmooth, false);
|
||||
sprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 2);
|
||||
sprite.pushSprite(38, 220);
|
||||
}
|
||||
rtticker = millis();
|
||||
cleanup = true;
|
||||
}
|
||||
}
|
||||
} else if (cleanup == true) {
|
||||
sprite.fillSprite(BackgroundColor);
|
||||
sprite2.fillSprite(BackgroundColor);
|
||||
if (advancedRDS) sprite2.pushSprite(35, 220); else sprite.pushSprite(38, 220);
|
||||
cleanup = false;
|
||||
}
|
||||
|
||||
if (wifi) {
|
||||
@@ -3939,7 +3929,7 @@ void ShowAFEON() {
|
||||
|
||||
if (radio.rds.hasEON) {
|
||||
if (haseonold == false) {
|
||||
tftPrint(-1, myLanguage[language][88], 184, 54, BackgroundColor, BackgroundColor, FONT16);
|
||||
tftPrint(-1, myLanguage[language][88], 184, 48, BackgroundColor, BackgroundColor, FONT16);
|
||||
tftPrint(-1, "PI:", 170, 32, ActiveColor, ActiveColorSmooth, FONT16);
|
||||
}
|
||||
haseonold = true;
|
||||
@@ -4164,7 +4154,7 @@ void BuildDisplay() {
|
||||
}
|
||||
}
|
||||
if (showsquelch) tftPrint(-1, "SQ:", 212, 145, ActiveColor, ActiveColorSmooth, FONT16);
|
||||
tftPrint(-1, "S/N", 246, 163, ActiveColor, ActiveColorSmooth, FONT16);
|
||||
tftPrint(1, "C/N", 275, 163, ActiveColor, ActiveColorSmooth, FONT16);
|
||||
tftPrint(-1, "dB", 300, 163, ActiveColor, ActiveColorSmooth, FONT16);
|
||||
if (region == 0) tftPrint(-1, "PI:", 216, 193, ActiveColor, ActiveColorSmooth, FONT16);
|
||||
if (region == 1) tftPrint(-1, "ID:", 216, 193, ActiveColor, ActiveColorSmooth, FONT16);
|
||||
@@ -4344,6 +4334,9 @@ void ShowFreq(int mode) {
|
||||
eonstringold = "";
|
||||
afstringold = "";
|
||||
rds_clockold = "";
|
||||
sprite.fillSprite(BackgroundColor);
|
||||
sprite2.fillSprite(BackgroundColor);
|
||||
if (advancedRDS) sprite2.pushSprite(35, 220); else sprite.pushSprite(38, 220);
|
||||
|
||||
if (wifi) {
|
||||
Udp.beginPacket(remoteip, 9030);
|
||||
@@ -4361,12 +4354,12 @@ void ShowSignalLevel() {
|
||||
snrupdatetimer = millis();
|
||||
if (!advancedRDS) {
|
||||
if (SNR > (SNRold + 1) || SNR < (SNRold - 1)) {
|
||||
if (SNRold == 0) tftPrint(1, "--", 294, 163, BackgroundColor, BackgroundColor, FONT16); else tftPrint(1, String(SNRold), 294, 163, BackgroundColor, BackgroundColor, FONT16);
|
||||
if (SNRold == 0) tftPrint(1, "--", 298, 163, BackgroundColor, BackgroundColor, FONT16); else tftPrint(1, String(SNRold), 298, 163, BackgroundColor, BackgroundColor, FONT16);
|
||||
if (tuned == true) {
|
||||
if (SNR == 0) tftPrint(1, "--", 294, 163, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, String(SNR), 294, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
if (SNR == 0) tftPrint(1, "--", 298, 163, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, String(SNR), 298, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
SNRold = SNR;
|
||||
} else {
|
||||
tftPrint(1, "--", 294, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
tftPrint(1, "--", 298, 163, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||
SNRold = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -402,9 +402,12 @@ void TEF6686::readRDS(bool showrdserrors)
|
||||
if (rdsReady) { // We have all data to decode... let's go...
|
||||
|
||||
//PI decoder
|
||||
if (rds.correct) rds.correctPI = rds.rdsA;
|
||||
if (rds.correct && afreset) {
|
||||
rds.correctPI = rds.rdsA;
|
||||
afreset = false;
|
||||
}
|
||||
|
||||
if (rds.region != 1 && (!rds.rdsAerror || rds.pierrors)) {
|
||||
if (rds.region != 1 && (rds.correct || rds.pierrors)) {
|
||||
if (rds.rdsA != piold) {
|
||||
piold = rds.rdsA;
|
||||
rds.picode[0] = (rds.rdsA >> 12) & 0xF;
|
||||
@@ -923,6 +926,7 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
||||
ps_counter = 0;
|
||||
af_counter = 0;
|
||||
eon_counter = 0;
|
||||
afreset = true;
|
||||
rds.MS = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -260,6 +260,7 @@ class TEF6686 {
|
||||
char rt_buffer32[33];
|
||||
bool useRTPlus = true;
|
||||
bool ABold;
|
||||
bool afreset;
|
||||
char stationTextBuffer[65];
|
||||
uint16_t rdsBprevious;
|
||||
uint16_t rdsCprevious;
|
||||
|
||||
+45
-46
@@ -255,10 +255,10 @@ static const uint8_t WiFi1[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x00, 0x00,
|
||||
0x00, 0x3c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x18, 0x00, 0x00
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x08, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const uint8_t WiFi2[] PROGMEM = {
|
||||
@@ -276,17 +276,17 @@ static const uint8_t WiFi2[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x38, 0x00, 0x00,
|
||||
0x00, 0xff, 0x00, 0x00,
|
||||
0x01, 0xff, 0x80, 0x00,
|
||||
0x03, 0xff, 0x80, 0x00,
|
||||
0x03, 0xe7, 0x80, 0x00,
|
||||
0x01, 0x83, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x00, 0x00,
|
||||
0x00, 0x3c, 0x00, 0x00,
|
||||
0x00, 0x3c, 0x00, 0x00,
|
||||
0x00, 0x18, 0x00, 0x00
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x7f, 0x00, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x00, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x08, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const uint8_t WiFi3[] PROGMEM = {
|
||||
@@ -297,50 +297,49 @@ static const uint8_t WiFi3[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7f, 0x00, 0x00,
|
||||
0x01, 0x80, 0xc0, 0x00,
|
||||
0x02, 0x00, 0x20, 0x00,
|
||||
0x04, 0x7e, 0x10, 0x00,
|
||||
0x09, 0x80, 0x88, 0x00,
|
||||
0x03, 0x00, 0x48, 0x00,
|
||||
0x0c, 0x00, 0x20, 0x00,
|
||||
0x04, 0x3e, 0x10, 0x00,
|
||||
0x00, 0xc1, 0x00, 0x00,
|
||||
0x01, 0x00, 0xc0, 0x00,
|
||||
0x01, 0x36, 0x40, 0x00,
|
||||
0x01, 0x43, 0x80, 0x00,
|
||||
0x00, 0x80, 0x80, 0x00,
|
||||
0x01, 0xff, 0xc0, 0x00,
|
||||
0x03, 0xff, 0xe0, 0x00,
|
||||
0x07, 0x80, 0xf0, 0x00,
|
||||
0x0e, 0x00, 0x38, 0x00,
|
||||
0x04, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00,
|
||||
0x00, 0x10, 0x00, 0x00,
|
||||
0x00, 0x7f, 0x00, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x00, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x08, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const uint8_t WiFi4[] PROGMEM = {
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x03, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xf8, 0x00,
|
||||
0x1f, 0xff, 0xfc, 0x00,
|
||||
0x3f, 0xc1, 0xfe, 0x00,
|
||||
0x7e, 0x00, 0x3f, 0x80,
|
||||
0xfc, 0x00, 0x0f, 0x80,
|
||||
0xf0, 0x7f, 0x07, 0x80,
|
||||
0x61, 0xff, 0xc3, 0x80,
|
||||
0x63, 0xff, 0xe1, 0x00,
|
||||
0x01, 0xff, 0xc0, 0x00,
|
||||
0x07, 0xff, 0xf0, 0x00,
|
||||
0x0f, 0xc0, 0xf8, 0x00,
|
||||
0x0f, 0x00, 0x7c, 0x00,
|
||||
0x1f, 0xc1, 0xfc, 0x00,
|
||||
0x3e, 0x00, 0x3e, 0x00,
|
||||
0x78, 0x00, 0x0f, 0x00,
|
||||
0x70, 0x00, 0x07, 0x00,
|
||||
0x60, 0x00, 0x03, 0x00,
|
||||
0x00, 0x7f, 0x00, 0x00,
|
||||
0x01, 0xff, 0xc0, 0x00,
|
||||
0x03, 0xff, 0xe0, 0x00,
|
||||
0x07, 0x80, 0xf0, 0x00,
|
||||
0x0e, 0x00, 0x38, 0x00,
|
||||
0x04, 0x3e, 0x08, 0x00,
|
||||
0x00, 0x7f, 0x80, 0x00,
|
||||
0x01, 0xff, 0xc0, 0x00,
|
||||
0x01, 0xff, 0xc0, 0x00,
|
||||
0x00, 0xe1, 0xc0, 0x00,
|
||||
0x00, 0x80, 0x80, 0x00,
|
||||
0x04, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1e, 0x00, 0x00,
|
||||
0x00, 0x7f, 0x00, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x00, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x1c, 0x00, 0x00,
|
||||
0x00, 0x08, 0x00, 0x00
|
||||
};
|
||||
Reference in New Issue
Block a user