some changes

This commit is contained in:
2026-01-17 16:01:54 +01:00
parent d1a8a50a8c
commit 7a9f9f868c
13 changed files with 7204 additions and 7205 deletions
+1 -1
View File
@@ -15,7 +15,6 @@
#include "scrolling_text.h"
#include "rtc.hpp"
extern bool RDSstatus;
extern bool RDSstatusold;
extern TFT_eSPI tft;
@@ -334,6 +333,7 @@ extern unsigned long tottimer;
extern unsigned long tuningtimer;
extern unsigned long udplogtimer;
extern unsigned long udptimer;
extern bool rds_settings_changed;
extern const size_t language_totalnumber;
extern const size_t language_entrynumber;
+6447 -6467
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -5,11 +5,11 @@
class Console {
public:
explicit Console(TFT_eSPI* display) : tft(display), y(0) {}
void print(String text) {
tft->setTextColor(TFT_WHITE, TFT_BLACK);
void print(String text, uint16_t background = TFT_BLACK) {
tft->setTextColor(TFT_WHITE, background);
tft->setTextDatum(TL_DATUM);
auto data = "[" + String(millis() / 1000.0f) + "] " + text;
tft->fillRect(0, y, tft->textWidth(data), tft->fontHeight(0), TFT_BLACK);
tft->fillRect(0, y, tft->textWidth(data), tft->fontHeight(0), background);
tft->drawString(data, 0, y, 0);
y += tft->fontHeight(0);
}
+15 -15
View File
@@ -397,7 +397,7 @@ TFT_eSPI::TFT_eSPI(int16_t w, int16_t h)
inTransaction = false;
lockTransaction = false;
_booted = true;
booted = true;
addr_row = 0xFFFF;
addr_col = 0xFFFF;
@@ -410,31 +410,31 @@ void TFT_eSPI::initBus() {
#ifdef TFT_CS
if (TFT_CS >= 0) {
pinMode(TFT_CS, OUTPUT);
digitalWrite(TFT_CS, HIGH); // Chip select high (inactive)
gpio_set_level((gpio_num_t)TFT_CS, 1);
}
#endif
if (TOUCH_CS >= 0) {
pinMode(TOUCH_CS, OUTPUT);
digitalWrite(TOUCH_CS, HIGH); // Chip select high (inactive)
gpio_set_level((gpio_num_t)TOUCH_CS, 1);
}
#ifdef TFT_DC
if (TFT_DC >= 0) {
pinMode(TFT_DC, OUTPUT);
digitalWrite(TFT_DC, HIGH); // Data/Command high = data mode
gpio_set_level((gpio_num_t)TFT_DC, 1);
}
#endif
if (TFT_RST >= 0) {
pinMode(TFT_RST, OUTPUT);
digitalWrite(TFT_RST, HIGH); // Set high, do not share pin with another SPI device
gpio_set_level((gpio_num_t)TFT_RST, 1);
}
}
void TFT_eSPI::init()
{
if (_booted) {
if (booted) {
initBus();
#if defined (TFT_MOSI) && !defined (TFT_SPI_OVERLAP)
@@ -451,7 +451,7 @@ void TFT_eSPI::init()
// Set to output once again in case MISO is used for CS
if (TFT_CS >= 0) {
pinMode(TFT_CS, OUTPUT);
digitalWrite(TFT_CS, HIGH); // Chip select high (inactive)
gpio_set_level((gpio_num_t)TFT_CS, 1);
}
#endif
@@ -460,23 +460,23 @@ void TFT_eSPI::init()
#if defined (TFT_DC)
if (TFT_DC >= 0) {
pinMode(TFT_DC, OUTPUT);
digitalWrite(TFT_DC, HIGH); // Data/Command high = data mode
gpio_set_level((gpio_num_t)TFT_DC, 1);
}
#endif
_booted = false;
booted = false;
end_tft_write();
} // end of: if just _booted
} // end of: if just booted
// Toggle RST low to reset
if (TFT_RST >= 0) {
pinMode(TFT_RST, OUTPUT);
writecommand(0x00); // Put SPI bus in known state for TFT with CS tied low
digitalWrite(TFT_RST, HIGH);
gpio_set_level((gpio_num_t)TFT_RST, 1);
delay(3);
digitalWrite(TFT_RST, LOW);
gpio_set_level((gpio_num_t)TFT_RST, 0);
delay(12);
digitalWrite(TFT_RST, HIGH);
gpio_set_level((gpio_num_t)TFT_RST, 1);
}
delay(50); // Wait for reset to complete
@@ -3015,11 +3015,11 @@ inline void TFT_eSPI::begin_touch_read_write() {
CS_H; // Just in case it has been left low
if (locked) {locked = false; spi.beginTransaction(SPISettings(SPI_TOUCH_FREQUENCY, MSBFIRST, SPI_MODE0));}
SET_BUS_READ_MODE;
digitalWrite(TOUCH_CS, LOW);
gpio_set_level((gpio_num_t)TOUCH_CS, 0);
}
inline void TFT_eSPI::end_touch_read_write() {
digitalWrite(TOUCH_CS, HIGH);
gpio_set_level((gpio_num_t)TOUCH_CS, 1);
if(!inTransaction) {if (!locked) {locked = true; spi.endTransaction();}}
}
+2 -2
View File
@@ -311,6 +311,8 @@ class TFT_eSPI { friend class TFT_eSprite;
virtual void drawGlyph(uint16_t code, uint16_t font);
bool booted;
typedef struct
{
const uint8_t* gArray; //array start pointer
@@ -413,8 +415,6 @@ uint8_t spi_write_speed;
bool textwrapX, textwrapY;
bool _swapBytes;
bool _booted;
uint32_t _lastColor;
bool _fillbg;
+10 -1
View File
@@ -1,6 +1,8 @@
CONFIG_APP_EXCLUDE_PROJECT_VER_VAR=y
CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=y
CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y
CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE=y
CONFIG_BOOTLOADER_WDT_TIME_MS=1000
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_BEFORE_NORESET=y
@@ -28,15 +30,22 @@ CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
# CONFIG_ARDUINO_SELECTIVE_WiFiProv is not set
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
CONFIG_ESP32_REV_MIN_1=y
CONFIG_ESP32_REV_MIN_2=y
# CONFIG_ESP32_DEBUG_OCDAWARE is not set
# CONFIG_ETH_USE_ESP32_EMAC is not set
# CONFIG_ETH_USE_SPI_ETHERNET is not set
# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set
# CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH is not set
# CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE is not set
CONFIG_PM_ENABLE=y
CONFIG_PM_DFS_INIT_AUTO=y
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
CONFIG_HAL_ASSERTION_DISABLE=y
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
# CONFIG_LOG_COLORS is not set
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MBEDTLS_PSK_MODES=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
# CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK is not set
+8 -8
View File
@@ -1303,17 +1303,17 @@ void TEF6686::readRDS(byte showrdserrors) {
runningbit = bitRead(rds.rdsB, 3);
switch (rds.rdsplusTag1) {
case 0: rds.rdsplusTag1 = 168; break;
case 1 ... 53: rds.rdsplusTag1 += 110; break;
case 59 ... 63: rds.rdsplusTag1 += 104; break;
default: rds.rdsplusTag1 = 168; break;
case 0: rds.rdsplusTag1 = 166; break;
case 1 ... 53: rds.rdsplusTag1 += 108; break;
case 59 ... 63: rds.rdsplusTag1 += 102; break;
default: rds.rdsplusTag1 = 166; break;
}
switch (rds.rdsplusTag2) {
case 0: rds.rdsplusTag2 = 168; break;
case 1 ... 53: rds.rdsplusTag2 += 110; break;
case 59 ... 63: rds.rdsplusTag2 += 104; break;
default: rds.rdsplusTag2 = 168; break;
case 0: rds.rdsplusTag2 = 166; break;
case 1 ... 53: rds.rdsplusTag2 += 108; break;
case 59 ... 63: rds.rdsplusTag2 += 102; break;
default: rds.rdsplusTag2 = 166; break;
}
if (togglebit) {
+4 -4
View File
@@ -778,7 +778,7 @@ void XDRGTKRoutine() {
if (!screenmute) {
tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor);
tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor);
tftPrint(ACENTER, textUI(33), 160, 100, ActiveColor, ActiveColorSmooth, 28);
tftPrint(ACENTER, textUI(31), 160, 100, ActiveColor, ActiveColorSmooth, 28);
}
DataPrint("U");
@@ -905,7 +905,7 @@ void tryWiFi() {
if (!setupmode && wifi) {
tft.drawRoundRect(1, 20, 319, 180, 5, ActiveColor);
tft.fillRoundRect(3, 22, 315, 176, 5, BackgroundColor);
Infoboxprint(textUI(54));
Infoboxprint(textUI(52));
}
if (wifi) {
if (wc.autoConnect()) {
@@ -917,9 +917,9 @@ void tryWiFi() {
webserver.begin();
NTPupdate();
remoteip = IPAddress(WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
if (!setupmode) tftPrint(ACENTER, textUI(56), 155, 128, InsignificantColor, InsignificantColorSmooth, 28);
if (!setupmode) tftPrint(ACENTER, textUI(54), 155, 128, InsignificantColor, InsignificantColorSmooth, 28);
} else {
if (!setupmode) tftPrint(ACENTER, textUI(55), 155, 128, SignificantColor, SignificantColorSmooth, 28);
if (!setupmode) tftPrint(ACENTER, textUI(53), 155, 128, SignificantColor, SignificantColorSmooth, 28);
Server.end();
webserver.stop();
Udp.stop();
+1
View File
@@ -320,6 +320,7 @@ unsigned long tottimer;
unsigned long tuningtimer;
unsigned long udplogtimer;
unsigned long udptimer;
bool rds_settings_changed;
const size_t language_totalnumber = sizeof(myLanguage) / sizeof(myLanguage[0]);
const size_t language_entrynumber = sizeof(myLanguage[0]) / sizeof(myLanguage[0][0]);
+659 -658
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -41,9 +41,9 @@ void handleRoot() {
html += "<img src=\"/logo.png\" alt=\"FMDX website\">";
html += "</a>";
html += "<h1>" + String(textUI(285)) + "</h1>";
html += "<button onclick=\"window.location.href='/downloadCSV'\">" + String(textUI(286)) + "</button>";
html += "<button class=\"go-to-bottom\" onclick=\" window.scrollTo(0, document.body.scrollHeight);\">" + String(textUI(288)) + "</button>";
html += "<h1>" + String(textUI(283)) + "</h1>";
html += "<button onclick=\"window.location.href='/downloadCSV'\">" + String(textUI(284)) + "</button>";
html += "<button class=\"go-to-bottom\" onclick=\" window.scrollTo(0, document.body.scrollHeight);\">" + String(textUI(286)) + "</button>";
// Sorting function with icons
html += "<script>";
@@ -143,9 +143,9 @@ void handleRoot() {
}
file.close();
} else html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(298)) + "</td></tr>";
} else html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(296)) + "</td></tr>";
if (!hasData) html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(287)) + "</td></tr>";
if (!hasData) html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(285)) + "</td></tr>";
html += "</table>";
html += "</body></html>";
+37 -29
View File
@@ -24,6 +24,8 @@ using fs::FS;
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_task_wdt.h>
#include "esp_pm.h"
#include "rtc_wdt.h"
#pragma endregion
Console console(&tft);
@@ -233,7 +235,7 @@ void SetTunerPatch() {
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
if(FORBIDDEN_TUNER(TEF)) {
tftPrint(ACENTER, textUI(34), 150, 78, ActiveColor, ActiveColorSmooth, 28);
tftPrint(ACENTER, textUI(32), 150, 78, ActiveColor, ActiveColorSmooth, 28);
for (;;);
}
EEPROM.writeByte(EE_BYTE_TEF, TEF);
@@ -1077,8 +1079,8 @@ void setAutoSpeedSPI() {
}
void endMenu() {
radio.clearRDS(fullsearchrds);
menu = false;
if(rds_settings_changed) radio.clearRDS(fullsearchrds);
rds_settings_changed = menu = false;
menuopen = false;
LowLevelInit = true;
submenu = false;
@@ -1364,7 +1366,7 @@ void setup() {
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == LOW && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == HIGH) {
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
DefaultSettings();
Infoboxprint(textUI(65));
Infoboxprint(textUI(63));
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
while (digitalRead(ROTARY_BUTTON) == LOW && digitalRead(BWBUTTON) == LOW) delay(50);
esp_restart();
@@ -1372,8 +1374,8 @@ void setup() {
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == LOW && digitalRead(BANDBUTTON) == HIGH) {
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
Infoboxprint(textUI(281));
tftPrint(ACENTER, textUI(282), 155, 100, ActiveColor, ActiveColorSmooth, 28);
Infoboxprint(textUI(279));
tftPrint(ACENTER, textUI(280), 155, 100, ActiveColor, ActiveColorSmooth, 28);
tft.calibrateTouch(TouchCalData, PrimaryColor, BackgroundColor, 30);
EEPROM.writeUInt(EE_UINT16_CALTOUCH1, TouchCalData[0]);
EEPROM.writeUInt(EE_UINT16_CALTOUCH2, TouchCalData[1]);
@@ -1385,7 +1387,7 @@ void setup() {
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
Infoboxprint(textUI(68));
Infoboxprint(textUI(66));
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
invertdisplay = !invertdisplay;
tft.invertDisplay(!invertdisplay);
@@ -1403,13 +1405,13 @@ void setup() {
for (int x = 0; x <= ContrastSet; x++) {
analogWrite(CONTRASTPIN, map(x, 0, 100, 15, 255));
delay(9);
delay(8);
}
console.print("Firmware " + String(VERSION));
if(!tef_found) {
console.print(textUI(8));
console.print(textUI(6));
while (true) delay(1);
}
@@ -1475,7 +1477,7 @@ void setup() {
}
if (wifi) {
console.print("Trying WiFi");
console.print("Trying WiFi, setting clock to 160 MHz");
tryWiFi();
delay(1750);
} else {
@@ -1674,7 +1676,7 @@ void loop() {
if (advancedRDS) {
tft.drawRoundRect(10, 30, 300, 170, 2, ActiveColor);
tft.fillRoundRect(12, 32, 296, 166, 2, BackgroundColor);
tftPrint(ACENTER, textUI(33), 160, 100, ActiveColor, ActiveColorSmooth, 28);
tftPrint(ACENTER, textUI(31), 160, 100, ActiveColor, ActiveColorSmooth, 28);
} else ShowFreq(1);
}
@@ -2363,18 +2365,18 @@ void SelectBand() {
ShowTuneMode();
ShowStepSize();
tftPrint(ALEFT, textUI(99), 70, 32, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(100), 70, 32, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(101), 70, 32, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(102), 70, 32, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(103), 70, 32, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(104), 70, 32, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(105), 70, 32, BackgroundColor, BackgroundColor, 16);
switch (band) {
case BAND_LW: tftPrint(ALEFT, textUI(101), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_MW: tftPrint(ALEFT, textUI(102), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_SW: tftPrint(ALEFT, textUI(103), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_FM: tftPrint(ALEFT, textUI(104), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_OIRT: tftPrint(ALEFT, textUI(105), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_LW: tftPrint(ALEFT, textUI(99), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_MW: tftPrint(ALEFT, textUI(100), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_SW: tftPrint(ALEFT, textUI(101), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_FM: tftPrint(ALEFT, textUI(102), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
case BAND_OIRT: tftPrint(ALEFT, textUI(103), 70, 32, (bandforbidden ? GreyoutColor : PrimaryColor), (bandforbidden ? BackgroundColor : PrimaryColorSmooth), 16); break;
}
}
leave = false;
@@ -2432,8 +2434,6 @@ void ModeButtonPress() {
Stereostatusold = false;
SStatusold = 2000;
BWOld = 0;
radio.clearRDS(fullsearchrds);
RDSstatus = false;
if (frequency % 10 != 0) {
if (fmdefaultstepsize == 1) Round100K(frequency); else Round50K(frequency);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_FM, frequency);
@@ -2920,11 +2920,11 @@ void ShowFreq(int mode) {
FrequencySprite.drawString(String(freq / 100) + "." + (freq % 100 < 10 ? "0" : "") + String(freq % 100) + " ", 218, -6, freqfont);
freqold = freq;
break;
case 1: Infoboxprint(textUI(33)); break;
case 2: Infoboxprint(textUI(289)); break;
case 3: Infoboxprint(textUI(290)); break;
case 4: Infoboxprint(textUI(294)); break;
case 5: Infoboxprint(textUI(283)); break;
case 1: Infoboxprint(textUI(31)); break;
case 2: Infoboxprint(textUI(287)); break;
case 3: Infoboxprint(textUI(288)); break;
case 4: Infoboxprint(textUI(292)); break;
case 5: Infoboxprint(textUI(281)); break;
}
FrequencySprite.pushSprite(46, 46);
@@ -3888,7 +3888,7 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui
tft.drawRect(59, 109, 202, 8, FrameColor);
tft.fillRect(60, 110, 200, 6, GreyoutColor);
tftPrint(ARIGHT, textUI(271), 120, 155, ActiveColor, ActiveColorSmooth, 16);
tftPrint(ARIGHT, textUI(269), 120, 155, ActiveColor, ActiveColorSmooth, 16);
for (frequency = startfreq * 10; frequency <= stopfreq * 10; frequency += 10) {
if (stopScanning) break;
@@ -3982,12 +3982,20 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui
return error;
}
extern "C" void app_main() {
extern "C" {
void app_main() {
rtc_wdt_disable();
rtc_wdt_protect_off();
initArduino();
setup();
esp_task_wdt_add(NULL);
rtc_wdt_enable();
rtc_wdt_protect_on();
while(true) {
esp_task_wdt_reset();
loop();
rtc_wdt_feed();
}
}
}
+7 -7
View File
@@ -54,7 +54,7 @@ void ShowAdvancedRDS() {
if (radio.rds.ECC.changed(0)) {
if (!screenmute) {
if (radio.rds.hasECC) ECCString = (radio.rds.ECCtext.length() == 0 ? textUI(72) : radio.rds.ECCtext); else ECCString = "N/A";
if (radio.rds.hasECC) ECCString = (radio.rds.ECCtext.length() == 0 ? textUI(70) : radio.rds.ECCtext); else ECCString = "N/A";
}
if (wifi) {
@@ -68,7 +68,7 @@ void ShowAdvancedRDS() {
if(!screenmute) eccDisplay.update(ECCString, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
String eonstring;
if (radio.eon_counter > 0) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? "" : " | "); else eonstring = textUI(87);
if (radio.eon_counter > 0) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? "" : " | "); else eonstring = textUI(85);
if (radio.rds.hasEON.changed(0)) {
if (!screenmute) {
if (radio.eon_counter > 0) tftPrint(ALEFT, "EON", 153, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "EON", 153, 51, GreyoutColor, BackgroundColor, 16);
@@ -78,7 +78,7 @@ void ShowAdvancedRDS() {
if(!screenmute) eonDisplay.update(eonstring, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
String rtplusstring;
if (radio.rds.hasRTplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(textUI(radio.rds.rdsplusTag1)) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(textUI(radio.rds.rdsplusTag2)) + ": " + String(radio.rds.RTContent2) : ""); else rtplusstring = textUI(88);
if (radio.rds.hasRTplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(textUI(radio.rds.rdsplusTag1)) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(textUI(radio.rds.rdsplusTag2)) + ": " + String(radio.rds.RTContent2) : ""); else rtplusstring = textUI(86);
if (radio.rds.hasRTplus.changed(0)) {
if (!screenmute) {
if (radio.rds.hasRTplus) tftPrint(ALEFT, "RT+", 123, 51, RDSColor, RDSColorSmooth, 16); else tftPrint(ALEFT, "RT+", 123, 51, GreyoutColor, BackgroundColor, 16);
@@ -404,7 +404,7 @@ void showPI() {
void showPTY() {
if(radio.rds.PTY.changed(0)) {
String PTYString = (radio.rds.region != 0 ? (radio.rds.region == 0 ? PTY_EU[radio.rds.PTY] : PTY_USA[radio.rds.PTY]) : textUI(227 + radio.rds.PTY));
String PTYString = (radio.rds.region != 0 ? (radio.rds.region == 0 ? PTY_EU[radio.rds.PTY] : PTY_USA[radio.rds.PTY]) : textUI(225 + radio.rds.PTY));
GeneralTextSprite.fillSprite(TFT_TRANSPARENT);
GeneralTextSprite.fillRect(0, 0, 160, 19, BackgroundColor);
if(RDSstatus) GeneralTextSprite.setTextColor(RDSColor, RDSColorSmooth, false);
@@ -572,7 +572,7 @@ void ShowAFEON() {
if (radio.rds.hasAF && afpagenr == 1) {
if (!hasafold) {
tftPrint(ALEFT, textUI(86), 6, 48, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(84), 6, 48, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, "AF:", 4, 32, ActiveColor, ActiveColorSmooth, 16);
hasafold = true;
}
@@ -595,7 +595,7 @@ void ShowAFEON() {
if (radio.eon_counter > 0 && afpagenr > 1) {
if (!haseonold) {
tftPrint(ALEFT, textUI(87), 6, 48, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, textUI(85), 6, 48, BackgroundColor, BackgroundColor, 16);
tftPrint(ALEFT, "PI", 4, 32, ActiveColor, ActiveColorSmooth, 16);
tftPrint(ACENTER, "TA", 250, 32, ActiveColor, ActiveColorSmooth, 16);
tftPrint(ACENTER, "TP", 276, 32, ActiveColor, ActiveColorSmooth, 16);
@@ -732,7 +732,7 @@ void ShowAFEON() {
aid_counterold = radio.rds.aid_counter;
if (AIDStringTemp != AIDStringold) {
AIDString = String(textUI(32)) + " - " + String(textUI(78)) + ": " + AIDStringTemp;
AIDString = String(textUI(30)) + " - " + String(textUI(76)) + ": " + AIDStringTemp;
AIDWidth = FullLineSprite.textWidth(AIDString);
AIDStringold = AIDString;
}