Merge branch 'main' into New_Model_DP_666
# Conflicts: # TEF6686_ESP32.ino
This commit is contained in:
+73
-66
@@ -646,7 +646,7 @@ void setup() {
|
|||||||
RDSSprite.createSprite(165, 19);
|
RDSSprite.createSprite(165, 19);
|
||||||
RDSSprite.setTextDatum(TL_DATUM);
|
RDSSprite.setTextDatum(TL_DATUM);
|
||||||
|
|
||||||
PSSprite.createSprite(150, 30);
|
PSSprite.createSprite(150, 32);
|
||||||
PSSprite.setTextDatum(TL_DATUM);
|
PSSprite.setTextDatum(TL_DATUM);
|
||||||
|
|
||||||
SquelchSprite.createSprite(47, 19);
|
SquelchSprite.createSprite(47, 19);
|
||||||
@@ -890,11 +890,11 @@ void loop() {
|
|||||||
if (millis() >= flashingtimer + 500) {
|
if (millis() >= flashingtimer + 500) {
|
||||||
flashing = !flashing;
|
flashing = !flashing;
|
||||||
if (flashing) {
|
if (flashing) {
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, ActiveColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "MEM", 22, 82, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16);
|
||||||
} else {
|
} else {
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "MEM", 22, 82, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
|
||||||
}
|
}
|
||||||
flashingtimer = millis();
|
flashingtimer = millis();
|
||||||
}
|
}
|
||||||
@@ -924,7 +924,7 @@ void loop() {
|
|||||||
if (af != 0 && dropout && millis() >= aftimer + 1000) {
|
if (af != 0 && dropout && millis() >= aftimer + 1000) {
|
||||||
aftimer = millis();
|
aftimer = millis();
|
||||||
if (radio.af_counter == 0) {
|
if (radio.af_counter == 0) {
|
||||||
if (findMemoryAF && radio.rds.correctPI != 0 && tunemode == TUNE_MEM) {
|
if (findMemoryAF && radio.rds.correctPI != 0 && tunemode == TUNE_MEM && (USN > 250 || WAM > 250)) {
|
||||||
radio.setMute();
|
radio.setMute();
|
||||||
tft.drawBitmap(92, 4, Speaker, 26, 22, PrimaryColor);
|
tft.drawBitmap(92, 4, Speaker, 26, 22, PrimaryColor);
|
||||||
SQ = true;
|
SQ = true;
|
||||||
@@ -2238,10 +2238,10 @@ void SelectBand() {
|
|||||||
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
|
||||||
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
|
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
|
||||||
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||||
tft.drawRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
tft.fillRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "iMS", 265, 59, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "iMS", 265, 59, BackgroundColor, BackgroundColor, 16);
|
||||||
tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
tft.fillRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "EQ", 301, 59, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "EQ", 301, 59, BackgroundColor, BackgroundColor, 16);
|
||||||
tftReplace(-1, "MHz", "kHz", 258, 76, ActiveColor, ActiveColorSmooth, BackgroundColor, 28);
|
tftReplace(-1, "MHz", "kHz", 258, 76, ActiveColor, ActiveColorSmooth, BackgroundColor, 28);
|
||||||
// todo
|
// todo
|
||||||
// if (band == AM_BAND_AIR) tftPrint(-1, "MHz", 258, 76, ActiveColor, ActiveColorSmooth, 28);
|
// if (band == AM_BAND_AIR) tftPrint(-1, "MHz", 258, 76, ActiveColor, ActiveColorSmooth, 28);
|
||||||
@@ -3543,14 +3543,14 @@ void doSquelch() {
|
|||||||
void updateBW() {//todo air
|
void updateBW() {//todo air
|
||||||
if (BWset == 0) {
|
if (BWset == 0) {
|
||||||
if (!screenmute && !advancedRDS && !afscreen) {
|
if (!screenmute && !advancedRDS && !afscreen) {
|
||||||
tft.drawRoundRect(247, 35, 71, 20, 5, ActiveColor);
|
tft.fillRoundRect(247, 35, 71, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "AUTO BW", 282, 38, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "AUTO BW", 282, 38, BackgroundColor, SecondaryColor, 16);
|
||||||
}
|
}
|
||||||
radio.setFMABandw();
|
radio.setFMABandw();
|
||||||
} else {
|
} else {
|
||||||
if (!screenmute && !advancedRDS && !afscreen) {
|
if (!screenmute && !advancedRDS && !afscreen) {
|
||||||
tft.drawRoundRect(247, 35, 71, 20, 5, GreyoutColor);
|
tft.fillRoundRect(247, 35, 71, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "AUTO BW", 282, 38, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "AUTO BW", 282, 38, BackgroundColor, GreyoutColor, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3559,14 +3559,14 @@ void updateiMS() {
|
|||||||
if (band < BAND_GAP) {
|
if (band < BAND_GAP) {
|
||||||
if (iMSset == 0) {
|
if (iMSset == 0) {
|
||||||
if (!screenmute && !advancedRDS && !afscreen) {
|
if (!screenmute && !advancedRDS && !afscreen) {
|
||||||
tft.drawRoundRect(248, 56, 32, 20, 5, ActiveColor);
|
tft.fillRoundRect(248, 56, 32, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "iMS", 265, 59, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "iMS", 265, 59, BackgroundColor, SecondaryColor, 16);
|
||||||
}
|
}
|
||||||
radio.setiMS(1);
|
radio.setiMS(1);
|
||||||
} else {
|
} else {
|
||||||
if (!screenmute && !advancedRDS && !afscreen) {
|
if (!screenmute && !advancedRDS && !afscreen) {
|
||||||
tft.drawRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
tft.fillRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "iMS", 265, 59, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "iMS", 265, 59, BackgroundColor, GreyoutColor, 16);
|
||||||
}
|
}
|
||||||
radio.setiMS(0);
|
radio.setiMS(0);
|
||||||
}
|
}
|
||||||
@@ -3577,14 +3577,14 @@ void updateEQ() {
|
|||||||
if (band < BAND_GAP) {
|
if (band < BAND_GAP) {
|
||||||
if (EQset == 0) {
|
if (EQset == 0) {
|
||||||
if (!screenmute && !advancedRDS && !afscreen) {
|
if (!screenmute && !advancedRDS && !afscreen) {
|
||||||
tft.drawRoundRect(286, 56, 32, 20, 5, ActiveColor);
|
tft.fillRoundRect(286, 56, 32, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "EQ", 301, 59, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "EQ", 301, 59, BackgroundColor, SecondaryColor, 16);
|
||||||
}
|
}
|
||||||
radio.setEQ(1);
|
radio.setEQ(1);
|
||||||
} else {
|
} else {
|
||||||
if (!screenmute && !advancedRDS && !afscreen) {
|
if (!screenmute && !advancedRDS && !afscreen) {
|
||||||
tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
tft.fillRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "EQ", 301, 59, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "EQ", 301, 59, BackgroundColor, GreyoutColor, 16);
|
||||||
}
|
}
|
||||||
radio.setEQ(0);
|
radio.setEQ(0);
|
||||||
}
|
}
|
||||||
@@ -3736,68 +3736,67 @@ void ShowTuneMode() {
|
|||||||
switch (tunemode) {
|
switch (tunemode) {
|
||||||
case TUNE_MAN:
|
case TUNE_MAN:
|
||||||
if (band == BAND_SW && nowToggleSWMIBand) {
|
if (band == BAND_SW && nowToggleSWMIBand) {
|
||||||
tftPrint(0, "AUTO", 22, 60, BackgroundColor, BackgroundColor, 16);
|
tftPrint(0, "AUTO", 22, 60, GreyoutColor, GreyoutColor, 16);
|
||||||
tft.drawRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "BAND", 22, 60, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16);
|
||||||
} else {
|
} else {
|
||||||
tftPrint(0, "BAND", 22, 60, BackgroundColor, BackgroundColor, 16);
|
tftPrint(0, "BAND", 22, 60, GreyoutColor, GreyoutColor, 16);
|
||||||
tft.drawRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "AUTO", 22, 60, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "AUTO", 22, 60, BackgroundColor, GreyoutColor, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
tft.drawRoundRect(1, 35, 42, 20, 5, ActiveColor);
|
tft.fillRoundRect(1, 35, 42, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "MAN", 22, 38, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "MAN", 22, 38, BackgroundColor, SecondaryColor, 16);
|
||||||
|
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "MEM", 22, 82, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TUNE_AUTO:
|
case TUNE_AUTO:
|
||||||
tft.drawRoundRect(1, 57, 42, 20, 5, ActiveColor);
|
tft.fillRoundRect(1, 57, 42, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "AUTO", 22, 60, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "AUTO", 22, 60, BackgroundColor, SecondaryColor, 16);
|
||||||
|
|
||||||
tft.drawRoundRect(1, 35, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 35, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "MAN", 22, 38, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16);
|
||||||
|
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "MEM", 22, 82, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TUNE_MEM:
|
case TUNE_MEM:
|
||||||
if (band == BAND_SW && nowToggleSWMIBand) {
|
if (band == BAND_SW && nowToggleSWMIBand) {
|
||||||
tftPrint(0, "AUTO", 22, 60, BackgroundColor, BackgroundColor, 16);
|
tftPrint(0, "AUTO", 22, 60, GreyoutColor, GreyoutColor, 16);
|
||||||
|
|
||||||
tft.drawRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "BAND", 22, 60, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16);
|
||||||
} else {
|
} else {
|
||||||
tftPrint(0, "BAND", 22, 60, BackgroundColor, BackgroundColor, 16);
|
tftPrint(0, "BAND", 22, 60, BackgroundColor, GreyoutColor, 16);
|
||||||
|
|
||||||
tft.drawRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 57, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "AUTO", 22, 60, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "AUTO", 22, 60, BackgroundColor, GreyoutColor, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
tft.drawRoundRect(1, 35, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 35, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "MAN", 22, 38, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16);
|
||||||
|
|
||||||
if (memorystore) {
|
if (memorystore) {
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, SignificantColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, SignificantColor);
|
||||||
tftPrint(0, "MEM", 22, 82, SignificantColor, SignificantColorSmooth, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, SignificantColor, 16);
|
||||||
} else {
|
} else {
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, ActiveColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "MEM", 22, 82, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TUNE_MI_BAND:
|
case TUNE_MI_BAND:
|
||||||
tft.drawRoundRect(1, 57, 42, 20, 5, ActiveColor);
|
tft.fillRoundRect(1, 57, 42, 20, 5, SecondaryColor);
|
||||||
tft.setTextColor(ActiveColor);
|
tftPrint(0, "BAND", 22, 60, BackgroundColor, SecondaryColor, 16);
|
||||||
tftPrint(0, "BAND", 22, 60, ActiveColor, ActiveColorSmooth, 16);
|
|
||||||
|
|
||||||
tft.drawRoundRect(1, 35, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 35, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "MAN", 22, 38, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "MAN", 22, 38, BackgroundColor, GreyoutColor, 16);
|
||||||
|
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "MEM", 22, 82, GreyoutColor, BackgroundColor, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, GreyoutColor, 16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4467,8 +4466,8 @@ void cancelDXScan() {
|
|||||||
tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
|
tft.drawBitmap(92, 4, Speaker, 26, 22, GreyoutColor);
|
||||||
|
|
||||||
if (!flashing) {
|
if (!flashing) {
|
||||||
tft.drawRoundRect(1, 79, 42, 20, 5, ActiveColor);
|
tft.fillRoundRect(1, 79, 42, 20, 5, SecondaryColor);
|
||||||
tftPrint(0, "MEM", 22, 82, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(0, "MEM", 22, 82, BackgroundColor, SecondaryColor, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
SQ = false;
|
SQ = false;
|
||||||
@@ -4680,12 +4679,10 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui
|
|||||||
band = BAND_FM;
|
band = BAND_FM;
|
||||||
tunemode = TUNE_MAN;
|
tunemode = TUNE_MAN;
|
||||||
|
|
||||||
tft.drawRect(65, 109, 190, 8, FrameColor);
|
tft.drawRect(59, 109, 202, 8, FrameColor);
|
||||||
tft.fillRect(66, 110, 188, 6, GreyoutColor);
|
tft.fillRect(60, 110, 200, 6, GreyoutColor);
|
||||||
tftPrint(1, myLanguage[language][272], 120, 155, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(1, myLanguage[language][272], 120, 155, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
while (digitalRead(ROTARY_BUTTON)) delay(50);
|
|
||||||
|
|
||||||
for (frequency = startfreq * 10; frequency <= stopfreq * 10; frequency += 10) {
|
for (frequency = startfreq * 10; frequency <= stopfreq * 10; frequency += 10) {
|
||||||
if (stopScanning) {
|
if (stopScanning) {
|
||||||
break;
|
break;
|
||||||
@@ -4740,12 +4737,12 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui
|
|||||||
SquelchSprite.drawString(String(counter), 0, 0);
|
SquelchSprite.drawString(String(counter), 0, 0);
|
||||||
SquelchSprite.pushSprite(200, 155);
|
SquelchSprite.pushSprite(200, 155);
|
||||||
|
|
||||||
tft.fillRect(66, 110, 2 * constrain(percent, 0, 94), 6, BarInsignificantColor);
|
tft.fillRect(60, 110, 2 * percent, 6, BarInsignificantColor);
|
||||||
|
|
||||||
percentold = percent;
|
percentold = percent;
|
||||||
}
|
}
|
||||||
if (digitalRead(ROTARY_BUTTON) == LOW) {
|
if (digitalRead(MODEBUTTON) == LOW) {
|
||||||
while (digitalRead(ROTARY_BUTTON)) delay(50);
|
while (digitalRead(MODEBUTTON)) delay(50);
|
||||||
error = 2;
|
error = 2;
|
||||||
stopScanning = true;
|
stopScanning = true;
|
||||||
break;
|
break;
|
||||||
@@ -4812,6 +4809,16 @@ void StoreMemoryPos(uint8_t _pos) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClearMemoryRange(uint8_t start, uint8_t stop) {
|
||||||
|
for (uint8_t pos = start; pos <= stop; pos++) {
|
||||||
|
EEPROM.writeByte(pos + EE_PRESETS_BAND_START, BAND_FM);
|
||||||
|
EEPROM.writeUInt((pos * 4) + EE_PRESETS_FREQUENCY_START, EE_PRESETS_FREQUENCY);
|
||||||
|
EEPROM.commit();
|
||||||
|
presets[pos].band = BAND_FM;
|
||||||
|
presets[pos].frequency = EE_PRESETS_FREQUENCY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEEPELEC_DP_66X
|
#ifdef DEEPELEC_DP_66X
|
||||||
byte numval[16] = {
|
byte numval[16] = {
|
||||||
2, 3, 127, 5, 6, 0, 9, 13, 8, 7, 4, 1, 0, 0, 0, 0
|
2, 3, 127, 5, 6, 0, 9, 13, 8, 7, 4, 1, 0, 0, 0, 0
|
||||||
|
|||||||
+4326
-4320
File diff suppressed because it is too large
Load Diff
+12190
-12170
File diff suppressed because it is too large
Load Diff
+22
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
byte menuitem;
|
byte menuitem;
|
||||||
byte items[10] = {10, static_cast<byte>(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 7, 6};
|
byte items[10] = {10, static_cast<byte>(dynamicspi ? 10 : 9), 7, 10, 10, 10, 9, 6, 7, 7};
|
||||||
extern mem presets[];
|
extern mem presets[];
|
||||||
bool setWiFiConnectParam = false;
|
bool setWiFiConnectParam = false;
|
||||||
|
|
||||||
@@ -1251,6 +1251,12 @@ void ShowOneLine(byte position, byte item, bool selected) {
|
|||||||
FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
FullLineSprite.drawString((scanmute ? myLanguage[language][42] : myLanguage[language][30]), 298, 2);
|
FullLineSprite.drawString((scanmute ? myLanguage[language][42] : myLanguage[language][30]), 298, 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case AUTOMEM:
|
||||||
|
FullLineSprite.setTextDatum(TL_DATUM);
|
||||||
|
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
||||||
|
FullLineSprite.drawString(removeNewline(myLanguage[language][276]), 6, 2);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -4533,6 +4539,21 @@ void DoMenu() {
|
|||||||
OneBigLineSprite.drawString((mempionly ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
|
OneBigLineSprite.drawString((mempionly ? myLanguage[language][42] : myLanguage[language][30]), 135, 0);
|
||||||
OneBigLineSprite.pushSprite(24, 118);
|
OneBigLineSprite.pushSprite(24, 118);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ITEM7:
|
||||||
|
Infoboxprint(myLanguage[language][276]);
|
||||||
|
|
||||||
|
ClearMemoryRange(memstartpos, memstoppos);
|
||||||
|
OneBigLineSprite.drawString(myLanguage[language][216], 135, 0);
|
||||||
|
OneBigLineSprite.pushSprite(24, 118);
|
||||||
|
|
||||||
|
switch (CurrentTheme) {
|
||||||
|
case 7: OneBigLineSprite.pushImage(-11, -118, 292, 170, popupbackground_wo); break;
|
||||||
|
default: OneBigLineSprite.pushImage(-11, -118, 292, 170, popupbackground); break;
|
||||||
|
}
|
||||||
|
OneBigLineSprite.drawString(String(memstartpos + 1) + " - " + String(memstoppos + 1) + " " + String(myLanguage[language][277]), 135, 0);
|
||||||
|
OneBigLineSprite.pushSprite(24, 148);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,4 +244,5 @@ extern void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, i
|
|||||||
extern void setAutoSpeedSPI();
|
extern void setAutoSpeedSPI();
|
||||||
extern void showAutoSquelch(bool mode);
|
extern void showAutoSquelch(bool mode);
|
||||||
extern uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, uint8_t stopmem, bool pisearch);
|
extern uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, uint8_t stopmem, bool pisearch);
|
||||||
|
extern void ClearMemoryRange(uint8_t start, uint8_t stop);
|
||||||
#endif
|
#endif
|
||||||
+103
-67
@@ -1,11 +1,11 @@
|
|||||||
#ifndef LANGUAGE_H
|
#ifndef LANGUAGE_H
|
||||||
#define LANGUAGE_H
|
#define LANGUAGE_H
|
||||||
|
|
||||||
#define VERSION "v2.11.2"
|
#define VERSION "v2.11.3"
|
||||||
|
|
||||||
// [number of languages][number of texts]
|
// [number of languages][number of texts]
|
||||||
|
|
||||||
static const char* const myLanguage[18][276] PROGMEM = {
|
static const char* const myLanguage[18][278] PROGMEM = {
|
||||||
{ "English", // English
|
{ "English", // English
|
||||||
"Rotary direction changed", // 1
|
"Rotary direction changed", // 1
|
||||||
"Please release button", // 2
|
"Please release button", // 2
|
||||||
@@ -281,7 +281,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Nederlands", // Dutch
|
{ "Nederlands", // Dutch
|
||||||
@@ -559,7 +561,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Gevonden", // 272
|
"Gevonden", // 272
|
||||||
"Afgebroken! Geheugen vol", // 273
|
"Afgebroken! Geheugen vol", // 273
|
||||||
"Afgebroken! Knop ingedrukt", // 274
|
"Afgebroken! Knop ingedrukt", // 274
|
||||||
"Zoeken zonder fouten voltooid" // 275
|
"Zoeken zonder fouten voltooid", // 275
|
||||||
|
"Wis geheugenkanalen", // 276
|
||||||
|
"gewist" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Polski", // Polish
|
{ "Polski", // Polish
|
||||||
@@ -837,7 +841,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Hrvatski", // Croatian
|
{ "Hrvatski", // Croatian
|
||||||
@@ -1115,7 +1121,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Ελληνικά", // Greek
|
{ "Ελληνικά", // Greek
|
||||||
@@ -1315,7 +1323,7 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"AM", // 194
|
"AM", // 194
|
||||||
"ΣΥΝΔΕΣΗ", // 195
|
"ΣΥΝΔΕΣΗ", // 195
|
||||||
"DX MODE", // 196
|
"DX MODE", // 196
|
||||||
"AUTO MEM", // 197
|
"ΑΥΤ. ΜΝΗΜΗ", // 197
|
||||||
"AM εξασθένιση", // 198
|
"AM εξασθένιση", // 198
|
||||||
"FM αποέμφαση", // 199
|
"FM αποέμφαση", // 199
|
||||||
"Μικρό", // 200
|
"Μικρό", // 200
|
||||||
@@ -1381,19 +1389,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Αρχικό", // 260
|
"Αρχικό", // 260
|
||||||
"Πάντα", //261
|
"Πάντα", //261
|
||||||
"Εμφάνιση ρολογιού", // 262
|
"Εμφάνιση ρολογιού", // 262
|
||||||
"Show long PS", // 263
|
"Εμφάνιση μεγάλου PS", // 263
|
||||||
"Start frequency", // 264
|
"Συχνότητα εκκίνησης", // 264
|
||||||
"Stop frequency", // 265
|
"Τελική συχνότητα", // 265
|
||||||
"Start memory channel", // 266
|
"Αρχικό κανάλι μνήμης", // 266
|
||||||
"Stop memory channel", // 267
|
"Τελικό κανάλι μνήμης", // 267
|
||||||
"Only store with RDS", // 268
|
"Αποθήκευση μόνο\nμε RDS", // 268
|
||||||
"Start auto memory", // 269
|
"Εκκίνηση αυτόματης μνήμης", // 269
|
||||||
"Auto memory", // 270
|
"Αυτόματη μνήμη", // 270
|
||||||
"ID λίστας σταθμών", // 271
|
"ID λίστας σταθμών", // 271
|
||||||
"Found", // 272
|
"Βρέθηκαν", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Ματαίωση! Τα κανάλια\nμνήμης εξαντλήθηκαν", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Ματαίωση! Πιέση\nπλήκτρου χρήστη", // 274
|
||||||
"Scan finished without errors" // 275
|
"Η ανίχνευση ολοκληρώθηκε\nχωρίς σφάλματα", // 275
|
||||||
|
"Εκκαθάριση καναλιών μνήμης", // 276
|
||||||
|
"εγινε εκκαθάριση" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Română", // Romanian
|
{ "Română", // Romanian
|
||||||
@@ -1671,7 +1681,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Deutsch", // German
|
{ "Deutsch", // German
|
||||||
@@ -1949,7 +1961,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Český", // Czech
|
{ "Český", // Czech
|
||||||
@@ -2227,7 +2241,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Magyar", // Hungarian
|
{ "Magyar", // Hungarian
|
||||||
@@ -2505,7 +2521,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Français", // French
|
{ "Français", // French
|
||||||
@@ -2771,19 +2789,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Initial", // 260
|
"Initial", // 260
|
||||||
"Toujours", // 261
|
"Toujours", // 261
|
||||||
"Afficher l'horloge", // 262
|
"Afficher l'horloge", // 262
|
||||||
"Show long PS", // 263
|
"Afficher PS long", // 263
|
||||||
"Start frequency", // 264
|
"Fréquence de début", // 264
|
||||||
"Stop frequency", // 265
|
"Fréquence de fin", // 265
|
||||||
"Start memory channel", // 266
|
"Commencer canal\nde mémoire", // 266
|
||||||
"Stop memory channel", // 267
|
"Arrêter canal\nde mémoire", // 267
|
||||||
"Only store with RDS", // 268
|
"Seulement stocker\navec RDS", // 268
|
||||||
"Start auto memory", // 269
|
"Commencer mémoire\nautomatique", // 269
|
||||||
"Auto memory", // 270
|
"Mémoire automatique", // 270
|
||||||
"Stationlist ID", // 271
|
"ID de la liste\ndes stations", // 271
|
||||||
"Found", // 272
|
"Trouvé", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abandonner! Plus\nde canaux de mémoire", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abandonner! Bouton\nappuyé par l'user", // 274
|
||||||
"Scan finished without errors" // 275
|
"Analyse terminée\nsans erreurs", // 275
|
||||||
|
"Effacer les canaux\nde mémoire", // 276
|
||||||
|
"effacé" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Български", // Bulgarian
|
{ "Български", // Bulgarian
|
||||||
@@ -3061,7 +3081,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Русский", // Russian
|
{ "Русский", // Russian
|
||||||
@@ -3339,7 +3361,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Українська", // Ukranian
|
{ "Українська", // Ukranian
|
||||||
@@ -3617,7 +3641,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Italiano", // Italian
|
{ "Italiano", // Italian
|
||||||
@@ -3895,7 +3921,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Simplified Chinese", // Simplified Chinese
|
{ "Simplified Chinese", // Simplified Chinese
|
||||||
@@ -4173,7 +4201,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Norsk", // Norwegian
|
{ "Norsk", // Norwegian
|
||||||
@@ -4451,7 +4481,9 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Found", // 272
|
"Found", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abort! Out of memorychannels", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abort! User pressed button", // 274
|
||||||
"Scan finished without errors" // 275
|
"Scan finished without errors", // 275
|
||||||
|
"Clear memory channels", // 276
|
||||||
|
"cleared" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Español", // Spanish
|
{ "Español", // Spanish
|
||||||
@@ -4717,19 +4749,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Inicial", // 260
|
"Inicial", // 260
|
||||||
"Siempre", // 261
|
"Siempre", // 261
|
||||||
"Mostrar reloj", // 262
|
"Mostrar reloj", // 262
|
||||||
"Show long PS", // 263
|
"Mostrar PS largo", // 263
|
||||||
"Start frequency", // 264
|
"Iniciar frecuencia", // 264
|
||||||
"Stop frequency", // 265
|
"Detener frecuencia", // 265
|
||||||
"Start memory channel", // 266
|
"Iniciar canal\nde memoria", // 266
|
||||||
"Stop memory channel", // 267
|
"Detener canal\nde memoria", // 267
|
||||||
"Only store with RDS", // 268
|
"Solo almacenar\ncon RDS", // 268
|
||||||
"Start auto memory", // 269
|
"Iniciar memoria automática", // 269
|
||||||
"Auto memory", // 270
|
"Memoria automática", // 270
|
||||||
"Stationlist ID", // 271
|
"ID de la lista\nde estaciones", // 271
|
||||||
"Found", // 272
|
"Encontrado", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"¡Abortar! Sin canales\nde memoria disponibles", // 273
|
||||||
"Abort! User pressed button", // 274
|
"¡Abortar! Usuario\npresionó el botón", // 274
|
||||||
"Scan finished without errors" // 275
|
"Escaneo finalizado\nsin errores", // 275
|
||||||
|
"Borrar canales\nde memoria", // 276
|
||||||
|
"borrado" // 277
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Português", // Portuguese
|
{ "Português", // Portuguese
|
||||||
@@ -4995,19 +5029,21 @@ static const char* const myLanguage[18][276] PROGMEM = {
|
|||||||
"Inicial", // 260
|
"Inicial", // 260
|
||||||
"Sempre", // 261
|
"Sempre", // 261
|
||||||
"Mostrar relógio", // 262
|
"Mostrar relógio", // 262
|
||||||
"Show long PS", // 263
|
"Mostrar PS longo", // 263
|
||||||
"Start frequency", // 264
|
"Iniciar frequência", // 264
|
||||||
"Stop frequency", // 265
|
"Parar frequência", // 265
|
||||||
"Start memory channel", // 266
|
"Iniciar canal de memória", // 266
|
||||||
"Stop memory channel", // 267
|
"Parar canal de memória", // 267
|
||||||
"Only store with RDS", // 268
|
"Somente armazenar\ncom RDS", // 268
|
||||||
"Start auto memory", // 269
|
"Iniciar memória automática", // 269
|
||||||
"Auto memory", // 270
|
"Memória automática", // 270
|
||||||
"ID da lista de estações", // 271
|
"ID da lista de estações", // 271
|
||||||
"Found", // 272
|
"Encontrado", // 272
|
||||||
"Abort! Out of memorychannels", // 273
|
"Abortar! Sem canais\nde memória disponíveis", // 273
|
||||||
"Abort! User pressed button", // 274
|
"Abortar! Usuário\npressionou o botão", // 274
|
||||||
"Scan finished without errors" // 275
|
"Verificação concluída\nsem erros", // 275
|
||||||
|
"Limpar canais\nde memória", // 276
|
||||||
|
"limpo" // 277
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
+35
-124
@@ -344,12 +344,12 @@ void readRds() {
|
|||||||
if (!radio.rds.hasLongPS) {
|
if (!radio.rds.hasLongPS) {
|
||||||
PSSprite.fillSprite(BackgroundColor);
|
PSSprite.fillSprite(BackgroundColor);
|
||||||
PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false);
|
||||||
PSSprite.drawString(PSold, 0, 0);
|
PSSprite.drawString(PSold, 0, 2);
|
||||||
|
|
||||||
if (advancedRDS) {
|
if (advancedRDS) {
|
||||||
PSSprite.pushSprite(36, 74);
|
PSSprite.pushSprite(36, 72);
|
||||||
} else {
|
} else {
|
||||||
PSSprite.pushSprite(36, 187);
|
PSSprite.pushSprite(36, 185);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,12 +400,12 @@ void readRds() {
|
|||||||
if (!radio.rds.hasLongPS) {
|
if (!radio.rds.hasLongPS) {
|
||||||
PSSprite.fillSprite(BackgroundColor);
|
PSSprite.fillSprite(BackgroundColor);
|
||||||
PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||||
PSSprite.drawString(PSold, 0, 0);
|
PSSprite.drawString(PSold, 0, 2);
|
||||||
|
|
||||||
if (advancedRDS) {
|
if (advancedRDS) {
|
||||||
PSSprite.pushSprite(36, 74);
|
PSSprite.pushSprite(36, 72);
|
||||||
} else {
|
} else {
|
||||||
PSSprite.pushSprite(36, 187);
|
PSSprite.pushSprite(36, 185);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,13 +707,13 @@ void showPS() {
|
|||||||
xPos5 = 0;
|
xPos5 = 0;
|
||||||
PSSprite.fillSprite(BackgroundColor);
|
PSSprite.fillSprite(BackgroundColor);
|
||||||
if (!RDSstatus || band > BAND_GAP) PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); else PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
if (!RDSstatus || band > BAND_GAP) PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); else PSSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||||
PSSprite.drawString(radio.rds.stationName, 0, 0);
|
PSSprite.drawString(radio.rds.stationName, 0, 2);
|
||||||
}
|
}
|
||||||
if (!screenmute) {
|
if (!screenmute) {
|
||||||
if (advancedRDS) {
|
if (advancedRDS) {
|
||||||
PSSprite.pushSprite(36, 74);
|
PSSprite.pushSprite(36, 72);
|
||||||
} else {
|
} else {
|
||||||
PSSprite.pushSprite(36, 187);
|
PSSprite.pushSprite(36, 185);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -925,22 +925,22 @@ void ShowAFEON() {
|
|||||||
if (afpagenr == 3) y = 10;
|
if (afpagenr == 3) y = 10;
|
||||||
|
|
||||||
for (byte i = 0; i < radio.eon_counter; i++) {
|
for (byte i = 0; i < radio.eon_counter; i++) {
|
||||||
if (eonpicodeold[i + y] == NULL) {
|
if (eonpicodeold[i + y] == nullptr) {
|
||||||
strcpy(eonpicodeold[i + y], "");
|
strcpy(eonpicodeold[i + y], "");
|
||||||
}
|
}
|
||||||
if (eonpsold[i + y] == NULL) {
|
if (eonpsold[i + y] == nullptr) {
|
||||||
eonpsold[i + y] = "";
|
eonpsold[i + y] = "";
|
||||||
}
|
}
|
||||||
if (mappedfreqold[i + y] == NULL) {
|
if (mappedfreqold[i + y] == 0) {
|
||||||
mappedfreqold[i + y] = 0;
|
mappedfreqold[i + y] = 0;
|
||||||
}
|
}
|
||||||
if (mappedfreqold2[i + y] == NULL) {
|
if (mappedfreqold2[i + y] == 0) {
|
||||||
mappedfreqold2[i + y] = 0;
|
mappedfreqold2[i + y] = 0;
|
||||||
}
|
}
|
||||||
if (mappedfreqold3[i + y] == NULL) {
|
if (mappedfreqold3[i + y] == 0) {
|
||||||
mappedfreqold3[i + y] = 0;
|
mappedfreqold3[i + y] = 0;
|
||||||
}
|
}
|
||||||
if (eonptyold[i + y] == NULL) {
|
if (eonptyold[i + y] == 0) {
|
||||||
eonptyold[i + y] = 0;
|
eonptyold[i + y] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -963,151 +963,62 @@ void ShowAFEON() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq > 0) {
|
if (radio.eon[i + y].mappedfreq > 0) {
|
||||||
tftPrint(1, "FREQ", 156, 32, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(1, "MF", 156, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq != mappedfreqold[i + y]) {
|
if (radio.eon[i + y].mappedfreq != mappedfreqold[i + y]) {
|
||||||
char oldFreq[10];
|
char oldFreq[10];
|
||||||
dtostrf(mappedfreqold[i + y] / 100.0, 5, 1, oldFreq);
|
dtostrf(mappedfreqold[i + y] / 100.0, 5, 1, oldFreq);
|
||||||
tftPrint(1, oldFreq, 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, oldFreq, 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
char newFreq[10];
|
char newFreq[10];
|
||||||
dtostrf(radio.eon[i + y].mappedfreq / 100.0, 5, 1, newFreq);
|
dtostrf(radio.eon[i + y].mappedfreq / 100.0, 5, 1, newFreq);
|
||||||
tftPrint(1, newFreq, 156, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
tftPrint(-1, newFreq, 156, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||||
mappedfreqold[i + y] = radio.eon[i + y].mappedfreq;
|
mappedfreqold[i + y] = radio.eon[i + y].mappedfreq;
|
||||||
} else {
|
} else {
|
||||||
char oldFreq[10];
|
tftPrint(-1, "", 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
dtostrf(mappedfreqold[i + y] / 100.0, 5, 1, oldFreq);
|
|
||||||
tftPrint(1, oldFreq, 156, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq2 > 0) {
|
if (radio.eon[i + y].mappedfreq2 > 0) {
|
||||||
|
tftPrint(1, "MF2", 214, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq2 != mappedfreqold2[i + y]) {
|
if (radio.eon[i + y].mappedfreq2 != mappedfreqold2[i + y]) {
|
||||||
char oldFreq2[10];
|
char oldFreq2[10];
|
||||||
dtostrf(mappedfreqold2[i + y] / 100.0, 5, 1, oldFreq2);
|
dtostrf(mappedfreqold2[i + y] / 100.0, 5, 1, oldFreq2);
|
||||||
tftPrint(1, oldFreq2, 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, oldFreq2, 214, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
char newFreq2[10];
|
char newFreq2[10];
|
||||||
dtostrf(radio.eon[i + y].mappedfreq2 / 100.0, 5, 1, newFreq2);
|
dtostrf(radio.eon[i + y].mappedfreq2 / 100.0, 5, 1, newFreq2);
|
||||||
tftPrint(1, newFreq2, 196, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
tftPrint(-1, newFreq2, 214, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||||
mappedfreqold2[i + y] = radio.eon[i + y].mappedfreq2;
|
mappedfreqold2[i + y] = radio.eon[i + y].mappedfreq2;
|
||||||
} else {
|
} else {
|
||||||
char oldFreq2[10];
|
tftPrint(-1, "", 214, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
dtostrf(mappedfreqold2[i + y] / 100.0, 5, 1, oldFreq2);
|
|
||||||
tftPrint(1, oldFreq2, 196, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq3 > 0) {
|
if (radio.eon[i + y].mappedfreq3 > 0) {
|
||||||
|
tftPrint(1, "MF3", 272, 32, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
if (radio.eon[i + y].mappedfreq3 != mappedfreqold3[i + y]) {
|
if (radio.eon[i + y].mappedfreq3 != mappedfreqold3[i + y]) {
|
||||||
char oldFreq3[10];
|
char oldFreq3[10];
|
||||||
dtostrf(mappedfreqold3[i + y] / 100.0, 5, 1, oldFreq3);
|
dtostrf(mappedfreqold3[i + y] / 100.0, 5, 1, oldFreq3);
|
||||||
tftPrint(1, oldFreq3, 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, oldFreq3, 272, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
}
|
}
|
||||||
char newFreq3[10];
|
char newFreq3[10];
|
||||||
dtostrf(radio.eon[i + y].mappedfreq3 / 100.0, 5, 1, newFreq3);
|
dtostrf(radio.eon[i + y].mappedfreq3 / 100.0, 5, 1, newFreq3);
|
||||||
tftPrint(1, newFreq3, 236, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
tftPrint(-1, newFreq3, 272, 48 + (15 * i), RDSDropoutColor, RDSDropoutColorSmooth, 16);
|
||||||
mappedfreqold3[i + y] = radio.eon[i + y].mappedfreq3;
|
mappedfreqold3[i + y] = radio.eon[i + y].mappedfreq3;
|
||||||
} else {
|
} else {
|
||||||
char oldFreq3[10];
|
tftPrint(-1, "", 272, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
dtostrf(mappedfreqold3[i + y] / 100.0, 5, 1, oldFreq3);
|
|
||||||
tftPrint(1, oldFreq3, 236, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i + y].taset) {
|
if (radio.eon[i + y].pty > 0) {
|
||||||
if (radio.eon[i + y].ta) {
|
tftPrint(1, String(radio.eon[i + y].pty), 304, 48 + (15 * i), RDSColor, RDSColorSmooth, 16);
|
||||||
tft.fillCircle(250, 54 + (15 * i), 4, InsignificantColor);
|
|
||||||
} else {
|
|
||||||
tft.fillCircle(250, 54 + (15 * i), 4, BackgroundColor);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tft.fillCircle(250, 54 + (15 * i), 4, BackgroundColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (radio.eon[i + y].tp) {
|
|
||||||
tft.fillCircle(276, 54 + (15 * i), 4, InsignificantColor);
|
|
||||||
} else {
|
|
||||||
tft.fillCircle(276, 54 + (15 * i), 4, BackgroundColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (radio.eon[i + y].pty != eonptyold[i + y]) {
|
|
||||||
tftReplace(0, String(eonptyold[i + y]), (radio.eon[i + y].pty < 32 ? String(radio.eon[i + y].pty) : " "), 304, 48 + (15 * i), RDSColor, RDSColorSmooth, BackgroundColor, 16);
|
|
||||||
eonptyold[i + y] = radio.eon[i + y].pty;
|
eonptyold[i + y] = radio.eon[i + y].pty;
|
||||||
}
|
|
||||||
|
|
||||||
if (i == 9) i = 254;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (radio.rds.hasAID) {
|
|
||||||
if (aid_counterold != radio.rds.aid_counter) {
|
|
||||||
String AIDStringTemp = "";
|
|
||||||
char id[5];
|
|
||||||
|
|
||||||
for (int y = 0; y < radio.rds.aid_counter; y++) {
|
|
||||||
bool aidProcessed = false;
|
|
||||||
|
|
||||||
for (int i = 0; i < 65; i++) {
|
|
||||||
if (radio.rds.aid[y] == oda_app_ids[i]) {
|
|
||||||
if (!aidProcessed) {
|
|
||||||
for (int z = 0; z < 4; z++) {
|
|
||||||
uint8_t nibble = (radio.rds.aid[y] >> (4 * (3 - z))) & 0xF;
|
|
||||||
if (nibble < 10) {
|
|
||||||
id[z] = nibble + '0';
|
|
||||||
} else {
|
|
||||||
id[z] = nibble - 10 + 'A';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
id[4] = '\0';
|
|
||||||
|
|
||||||
AIDStringTemp += String(id);
|
|
||||||
AIDStringTemp += ": ";
|
|
||||||
AIDStringTemp += oda_app_names[i];
|
|
||||||
|
|
||||||
aidProcessed = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aidProcessed && y < radio.rds.aid_counter - 1) {
|
|
||||||
AIDStringTemp += " | ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
aid_counterold = radio.rds.aid_counter;
|
|
||||||
|
|
||||||
if (AIDStringTemp != AIDStringold) {
|
|
||||||
AIDString = String(myLanguage[language][93]) + " - " + String(myLanguage[language][79]) + ": " + AIDStringTemp + " ";
|
|
||||||
AIDWidth = FullLineSprite.textWidth(AIDString);
|
|
||||||
AIDStringold = AIDString;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FullLineSprite.textWidth(radio.trimTrailingSpaces(AIDString)) < 270) {
|
|
||||||
xPos = 0;
|
|
||||||
FullLineSprite.fillSprite(BackgroundColor);
|
|
||||||
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
|
||||||
FullLineSprite.drawString(AIDString, xPos, 2);
|
|
||||||
FullLineSprite.drawLine(283, 0, 283, 19, FrameColor);
|
|
||||||
FullLineSprite.pushSprite(5, 220);
|
|
||||||
} else {
|
|
||||||
if (millis() - rtticker >= 5) {
|
|
||||||
if (xPos < -AIDWidth) xPos = 0;
|
|
||||||
if (xPos == 0) {
|
|
||||||
if (millis() - rttickerhold >= 2000) {
|
|
||||||
xPos--;
|
|
||||||
rttickerhold = millis();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
xPos--;
|
tftPrint(-1, String(eonptyold[i + y]), 304, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
rttickerhold = millis();
|
|
||||||
}
|
}
|
||||||
FullLineSprite.fillSprite(BackgroundColor);
|
|
||||||
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
|
if (radio.eon[i + y].ta) tftPrint(0, "X", 250, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "X", 250, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
FullLineSprite.drawString(AIDString, xPos, 2);
|
if (radio.eon[i + y].tp) tftPrint(0, "X", 276, 48 + (15 * i), RDSColor, RDSColorSmooth, 16); else tftPrint(0, "X", 276, 48 + (15 * i), BackgroundColor, BackgroundColor, 16);
|
||||||
FullLineSprite.drawString(AIDString, xPos + AIDWidth, 2);
|
|
||||||
FullLineSprite.drawLine(314, 0, 314, 19, FrameColor);
|
|
||||||
FullLineSprite.pushSprite(5, 220);
|
|
||||||
rtticker = millis();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user