From 172ee138da4e2b8af2babfbb44afcc03de51d65c Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sun, 11 Jan 2026 14:06:31 +0100 Subject: [PATCH] massive changes in sprite and fonts --- include/globals.h | 9 +- include/rtc.hpp | 4 +- include/scrolling_text.h | 13 +- src/TEF6686.cpp | 10 +- src/globals.cpp | 23 +- src/gui.cpp | 2478 +++++++++++++++++++------------------- src/main.cpp | 107 +- src/rds.cpp | 129 +- src/rtc.cpp | 15 + 9 files changed, 1385 insertions(+), 1403 deletions(-) diff --git a/include/globals.h b/include/globals.h index 2ae26cf..57ef7cb 100644 --- a/include/globals.h +++ b/include/globals.h @@ -346,14 +346,11 @@ extern mem presets[EE_PRESETS_CNT]; extern TEF6686 radio; extern TFT_eSprite FrequencySprite; -extern TFT_eSprite RDSSprite; -extern TFT_eSprite SquelchSprite; -extern TFT_eSprite FullLineSprite; extern TFT_eSprite OneBigLineSprite; extern TFT_eSprite SignalSprite; -extern TFT_eSprite PSSprite; -extern TFT_eSprite PTYSprite; -extern TFT_eSprite CTSprite; +extern TFT_eSprite SettingsSprite; +extern TFT_eSprite General16Sprite; +extern TFT_eSprite General28Sprite; extern WiFiConnect wc; extern WiFiServer Server; diff --git a/include/rtc.hpp b/include/rtc.hpp index b9ab276..a3d1a31 100644 --- a/include/rtc.hpp +++ b/include/rtc.hpp @@ -15,4 +15,6 @@ void timeToDateTime(time_t t, struct RX8010SJ::DateTime* dateTime); time_t dateTimeToTime(const struct RX8010SJ::DateTime* dateTime); void sync_to_rx_rtc(int32_t offset = 0); -void sync_from_rx_rtc(int32_t offset = 0); \ No newline at end of file +void sync_from_rx_rtc(int32_t offset = 0); +time_t get_time(); +void set_time(time_t time); \ No newline at end of file diff --git a/include/scrolling_text.h b/include/scrolling_text.h index b66e3b2..67a61aa 100644 --- a/include/scrolling_text.h +++ b/include/scrolling_text.h @@ -9,6 +9,8 @@ private: int yPos; int maxWidth; int xPos; + int usedX; + int usedY; int textWidth; unsigned long lastTick; unsigned long holdTick; @@ -19,9 +21,9 @@ private: static const unsigned long HOLD_DURATION = 2000; public: - ScrollingTextDisplay(TFT_eSprite* spr, int y, int maxW) + ScrollingTextDisplay(TFT_eSprite* spr, int y, int maxW, int spriteX, int spriteY) : sprite(spr), yPos(y), maxWidth(maxW), - xPos(0), textWidth(0), lastTick(0), holdTick(0), isScrolling(false), postDrawCallback(nullptr) {} + xPos(0), usedX(spriteX), usedY(spriteY), textWidth(0), lastTick(0), holdTick(0), isScrolling(false), postDrawCallback(nullptr) {} void setPostDrawCallback(std::function callback) { postDrawCallback = callback; @@ -71,12 +73,15 @@ public: private: void drawText(const String& text, bool status, uint16_t activeColor, uint16_t activeSmooth, uint16_t dropoutColor, uint16_t dropoutSmooth, uint16_t backgroundColor) { - sprite->fillSprite(backgroundColor); + sprite->fillSprite(TFT_TRANSPARENT); + sprite->setViewport(0, 0, usedX, usedY); + sprite->fillRect(0, 0, usedX, usedY, backgroundColor); if(status) sprite->setTextColor(activeColor, activeSmooth, false); else sprite->setTextColor(dropoutColor, dropoutSmooth, false); sprite->drawString(text, xPos, 0); if(isScrolling) sprite->drawString(text, xPos + textWidth, 0); if(postDrawCallback) postDrawCallback(sprite, false); - sprite->pushSprite(35, yPos); + sprite->pushSprite(35, yPos, TFT_TRANSPARENT); + sprite->resetViewport(); } }; \ No newline at end of file diff --git a/src/TEF6686.cpp b/src/TEF6686.cpp index d721790..4fbc38e 100644 --- a/src/TEF6686.cpp +++ b/src/TEF6686.cpp @@ -1212,7 +1212,7 @@ void TEF6686::readRDS(byte showrdserrors) { case RDS_GROUP_4A: { if (!rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold && rds.ctupdate && (rds.PICTlock == pi || rds.PICTlock == 0)) { - auto rtc_time = rtc.getEpoch(); + auto rtc_time = get_time(); uint32_t mjd = (rds.rdsB & 0x03) << 15 | ((rds.rdsC >> 1) & 0x7FFF); uint16_t hour, minute, day = 5, month = 1, year = 2026; int32_t timeoffset; @@ -1254,12 +1254,10 @@ void TEF6686::readRDS(byte showrdserrors) { rtcset = true; time_t rds_utc_time = rdstime + timeoffset; - rds.clock_correction = rtc_time - rds_utc_time; + time_t new_correction = rtc_time - rds_utc_time; + rds.clock_correction = (rds.clock_correction * 3 + new_correction) / 4; - if (!NTPupdated) { - rtc.setTime(rds_utc_time); - sync_to_rx_rtc(); - } + if (!NTPupdated) set_time(rds_utc_time+rds.clock_correction); } else rds.hasCT = false; lastrdstime = rdstime; lasttimeoffset = timeoffset; diff --git a/src/globals.cpp b/src/globals.cpp index bed6aba..c76675b 100644 --- a/src/globals.cpp +++ b/src/globals.cpp @@ -332,21 +332,16 @@ mem presets[EE_PRESETS_CNT]; TEF6686 radio; // FrequencySprite.createSprite(200, 50); -// RDSSprite.createSprite(165, 19); -// PSSprite.createSprite(150, 32); -// PTYSprite.createSprite(160, 19); -// SquelchSprite.createSprite(27, 19); -// FullLineSprite.createSprite(308, 19); +// SettingsSprite.createSprite(150, 32); +// General16Sprite.createSprite(308, 28); // OneBigLineSprite.createSprite(270, 30); TFT_eSprite FrequencySprite = TFT_eSprite(&tft); -TFT_eSprite RDSSprite = TFT_eSprite(&tft); -TFT_eSprite PTYSprite = TFT_eSprite(&tft); +TFT_eSprite General16Sprite = TFT_eSprite(&tft); TFT_eSprite SignalSprite = TFT_eSprite(&tft); -TFT_eSprite SquelchSprite = TFT_eSprite(&tft); -TFT_eSprite FullLineSprite = TFT_eSprite(&tft); TFT_eSprite OneBigLineSprite = TFT_eSprite(&tft); -TFT_eSprite PSSprite = TFT_eSprite(&tft); +TFT_eSprite SettingsSprite = TFT_eSprite(&tft); +TFT_eSprite General28Sprite = TFT_eSprite(&tft); WiFiConnect wc; WiFiServer Server(7373); @@ -354,7 +349,7 @@ WiFiClient RemoteClient; WiFiUDP Udp; WebServer webserver(80); -ScrollingTextDisplay rtplusDisplay(&RDSSprite, 147, 180); -ScrollingTextDisplay eonDisplay(&RDSSprite, 174, 180); -ScrollingTextDisplay eccDisplay(&FullLineSprite, 198, 270); -ScrollingTextDisplay rtDisplay(&FullLineSprite, 220, 270); \ No newline at end of file +ScrollingTextDisplay rtplusDisplay(&General16Sprite, 147, 180, 165, 19); +ScrollingTextDisplay eonDisplay(&General16Sprite, 174, 180, 165, 19); +ScrollingTextDisplay eccDisplay(&General16Sprite, 198, 270, 308, 19); +ScrollingTextDisplay rtDisplay(&General16Sprite, 220, 270, 308, 19); \ No newline at end of file diff --git a/src/gui.cpp b/src/gui.cpp index 0c9120a..ce26eb0 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -627,14 +627,14 @@ void BuildAFScreen() { void ShowOneLine(byte position, byte item, bool selected) { switch (CurrentTheme) { - case 7: FullLineSprite.pushImage (-8, -(position + 2), 320, 240, configurationbackground_wo); break; - default: FullLineSprite.pushImage (-8, -(position + 2), 320, 240, configurationbackground); break; + case 7: General16Sprite.pushImage(-8, -(position + 2), 320, 240, configurationbackground_wo); break; + default: General16Sprite.pushImage(-8, -(position + 2), 320, 240, configurationbackground); break; } if (selected) { switch (CurrentTheme) { - case 7: FullLineSprite.pushImage(0, 0, 304, 19, selector_wo); break; - default: FullLineSprite.pushImage(0, 0, 304, 19, selector); break; + case 7: General16Sprite.pushImage(0, 0, 304, 19, selector_wo); break; + default: General16Sprite.pushImage(0, 0, 304, 19, selector); break; } } @@ -642,105 +642,105 @@ void ShowOneLine(byte position, byte item, bool selected) { case 0: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(177)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(177)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(108)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(108)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (hardwaremodel) { - case BASE_ILI9341: FullLineSprite.drawString(textUI(109), 298, 2); break; - case PORTABLE_ILI9341: FullLineSprite.drawString(textUI(110), 298, 2); break; - case PORTABLE_TOUCH_ILI9341: FullLineSprite.drawString(textUI(111), 298, 2); break; + case BASE_ILI9341: General16Sprite.drawString(textUI(109), 298, 2); break; + case PORTABLE_ILI9341: General16Sprite.drawString(textUI(110), 298, 2); break; + case PORTABLE_TOUCH_ILI9341: General16Sprite.drawString(textUI(111), 298, 2); break; } break; case AUDIOSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(20)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(20)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("dB", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((VolSet > 0 ? "+" : "") + String(VolSet, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("dB", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((VolSet > 0 ? "+" : "") + String(VolSet, DEC), 258, 2); break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(39)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(39)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(textUI(0), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(textUI(0), 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(38)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(38)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (showrdserrors) { - case 0: FullLineSprite.drawString(textUI(30), 298, 2); break; - case 1: FullLineSprite.drawString(textUI(200), 298, 2); break; - case 2: FullLineSprite.drawString(textUI(201), 298, 2); break; + case 0: General16Sprite.drawString(textUI(30), 298, 2); break; + case 1: General16Sprite.drawString(textUI(200), 298, 2); break; + case 2: General16Sprite.drawString(textUI(201), 298, 2); break; } break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(21)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(21)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("MHz", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(ConverterSet, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("MHz", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(ConverterSet, DEC), 258, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(44)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(44)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((softmuteam ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((softmuteam ? textUI(31) : textUI(30)), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(5)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(5)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((USBmode ? "RDS Spy" : "XDRGTK"), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((USBmode ? "RDS Spy" : "XDRGTK"), 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(212)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(212)), 6, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(269)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(269)), 6, 2); break; } break; @@ -748,112 +748,112 @@ void ShowOneLine(byte position, byte item, bool selected) { case 1: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(178)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(178)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(107)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(107)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((touchrotating ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((touchrotating ? textUI(31) : textUI(30)), 298, 2); break; case AUDIOSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(45)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(45)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((edgebeep ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((edgebeep ? textUI(31) : textUI(30)), 298, 2); break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(29)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(29)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(ContrastSet, DEC), 258, 2); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("%", 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(ContrastSet, DEC), 258, 2); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("%", 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(46)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(46)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (radio.rds.region) { - case 0: FullLineSprite.drawString(textUI(47), 298, 2); break; - case 1: FullLineSprite.drawString(String(textUI(48)) + " DB", 298, 2); break; - case 2: FullLineSprite.drawString(textUI(48), 298, 2); break; - case 3: FullLineSprite.drawString(textUI(300), 298, 2); break; + case 0: General16Sprite.drawString(textUI(47), 298, 2); break; + case 1: General16Sprite.drawString(String(textUI(48)) + " DB", 298, 2); break; + case 2: General16Sprite.drawString(textUI(48), 298, 2); break; + case 3: General16Sprite.drawString(textUI(300), 298, 2); break; } break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(22)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(22)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("MHz", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(LowEdgeSet / 10 + ConverterSet, DEC) + "." + String(LowEdgeSet % 10 + ConverterSet, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("MHz", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(LowEdgeSet / 10 + ConverterSet, DEC) + "." + String(LowEdgeSet % 10 + ConverterSet, DEC), 258, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(64)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(64)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (amnb != 0) FullLineSprite.drawString(String(amnb, DEC), 258, 2); - if (amnb != 0) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((amnb != 0 ? "%" : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (amnb != 0) General16Sprite.drawString(String(amnb, DEC), 258, 2); + if (amnb != 0) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((amnb != 0 ? "%" : textUI(30)), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(51) + (wifi ? " IP: " + String(WiFi.localIP().toString()) : "")), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(51) + (wifi ? " IP: " + String(WiFi.localIP().toString()) : "")), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((wifi ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((wifi ? textUI(31) : textUI(30)), 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(209)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(209)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(scanstart + 1, DEC), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(scanstart + 1, DEC), 298, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(264)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(264)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("MHz", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(memstartfreq / 10 + ConverterSet, DEC) + "." + String(memstartfreq % 10 + ConverterSet, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("MHz", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(memstartfreq / 10 + ConverterSet, DEC) + "." + String(memstartfreq % 10 + ConverterSet, DEC), 258, 2); break; } break; @@ -861,111 +861,111 @@ void ShowOneLine(byte position, byte item, bool selected) { case 2: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(179)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(179)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(75)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(75)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (tot != 0) FullLineSprite.drawString(String(tot), 258, 2); - if (tot != 0) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((tot != 0 ? textUI(80) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (tot != 0) General16Sprite.drawString(String(tot), 258, 2); + if (tot != 0) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((tot != 0 ? textUI(80) : textUI(30)), 298, 2); break; case AUDIOSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(67)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(67)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((audiomode ? "MPX" : "Stereo"), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((audiomode ? "MPX" : "Stereo"), 298, 2); break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(63)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(63)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((showmodulation ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((showmodulation ? textUI(31) : textUI(30)), 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(49)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(49)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (radio.underscore) { - case 0: FullLineSprite.drawString(textUI(30), 298, 2); break; - case 1: FullLineSprite.drawString(textUI(50), 298, 2); break; - case 2: FullLineSprite.drawString(textUI(31), 298, 2); break; + case 0: General16Sprite.drawString(textUI(30), 298, 2); break; + case 1: General16Sprite.drawString(textUI(50), 298, 2); break; + case 2: General16Sprite.drawString(textUI(31), 298, 2); break; } break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(23)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(23)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("MHz", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(HighEdgeSet / 10 + ConverterSet, DEC) + "." + String(HighEdgeSet % 10 + ConverterSet, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("MHz", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(HighEdgeSet / 10 + ConverterSet, DEC) + "." + String(HighEdgeSet % 10 + ConverterSet, DEC), 258, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(97)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(97)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("dB", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((AMLevelOffset > 0 ? "+" : "") + String(AMLevelOffset, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("dB", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((AMLevelOffset > 0 ? "+" : "") + String(AMLevelOffset, DEC), 258, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(52)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(52)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(">", 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(">", 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(210)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(210)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(scanstop + 1, DEC), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(scanstop + 1, DEC), 298, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(265)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(265)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("MHz", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(memstopfreq / 10 + ConverterSet, DEC) + "." + String(memstopfreq % 10 + ConverterSet, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("MHz", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(memstopfreq / 10 + ConverterSet, DEC) + "." + String(memstopfreq % 10 + ConverterSet, DEC), 258, 2); break; } break; @@ -973,107 +973,107 @@ void ShowOneLine(byte position, byte item, bool selected) { case 3: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(180)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(180)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(62)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(62)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (autosquelch) FullLineSprite.drawString(textUI(86), 298, 2); else FullLineSprite.drawString((usesquelch ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (autosquelch) General16Sprite.drawString(textUI(86), 298, 2); else General16Sprite.drawString((usesquelch ? textUI(31) : textUI(30)), 298, 2); break; case AUDIOSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(25)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(25)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (StereoLevel != 0) FullLineSprite.drawString(String(StereoLevel, DEC), 258, 2); - if (StereoLevel != 0) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((StereoLevel != 0 ? "dBμV" : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (StereoLevel != 0) General16Sprite.drawString(String(StereoLevel, DEC), 258, 2); + if (StereoLevel != 0) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((StereoLevel != 0 ? "dBμV" : textUI(30)), 298, 2); break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(91)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(91)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (screensaverset) FullLineSprite.drawString(String(screensaverOptions[screensaverset], DEC), 258, 2); - if (screensaverset) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((screensaverset ? textUI(92) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (screensaverset) General16Sprite.drawString(String(screensaverOptions[screensaverset], DEC), 258, 2); + if (screensaverset) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((screensaverset ? textUI(92) : textUI(30)), 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(60)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(60)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((radio.rds.filter ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((radio.rds.filter ? textUI(31) : textUI(30)), 298, 2); break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(24)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(24)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("dB", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((LevelOffset > 0 ? "+" : "") + String(LevelOffset, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("dB", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((LevelOffset > 0 ? "+" : "") + String(LevelOffset, DEC), 258, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(59)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(59)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((showSWMIBand ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((showSWMIBand ? textUI(31) : textUI(30)), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(58)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(58)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((wifi ? String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(subnetclient, DEC) : "-"), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((wifi ? String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(subnetclient, DEC) : "-"), 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(211)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(211)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(92)), 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((scanhold == 0 ? "0.5" : String(scanhold, DEC)), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(92)), 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((scanhold == 0 ? "0.5" : String(scanhold, DEC)), 258, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(266)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(266)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(memstartpos + 1, DEC), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(memstartpos + 1, DEC), 298, 2); break; } break; @@ -1081,113 +1081,113 @@ void ShowOneLine(byte position, byte item, bool selected) { case 4: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(181)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(181)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(37)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(37)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("dBµV", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(fmagc, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("dBµV", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(fmagc, DEC), 258, 2); break; case AUDIOSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(26)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(26)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(HighCutLevel * 100, DEC), 258, 2); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("Hz", 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(HighCutLevel * 100, DEC), 258, 2); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("Hz", 298, 2); break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(74)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(74)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (poweroptions) { - case LCD_OFF: FullLineSprite.drawString(textUI(76), 298, 2); break; - case LCD_BRIGHTNESS_1_PERCENT: FullLineSprite.drawString(textUI(94), 298, 2); break; - case LCD_BRIGHTNESS_A_QUARTER: FullLineSprite.drawString(textUI(95), 298, 2); break; - case LCD_BRIGHTNESS_HALF: FullLineSprite.drawString(textUI(96), 298, 2); break; + case LCD_OFF: General16Sprite.drawString(textUI(76), 298, 2); break; + case LCD_BRIGHTNESS_1_PERCENT: General16Sprite.drawString(textUI(94), 298, 2); break; + case LCD_BRIGHTNESS_A_QUARTER: General16Sprite.drawString(textUI(95), 298, 2); break; + case LCD_BRIGHTNESS_HALF: General16Sprite.drawString(textUI(96), 298, 2); break; } break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(61)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(61)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((radio.rds.pierrors ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((radio.rds.pierrors ? textUI(31) : textUI(30)), 298, 2); break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(28)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(28)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("dBμV", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(LowLevelSet, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("dBμV", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(LowLevelSet, DEC), 258, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(185)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(185)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (amcodect != 0) FullLineSprite.drawString(String(amcodect, DEC), 258, 2); - if (amcodect != 0) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((amcodect != 0 ? "%" : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (amcodect != 0) General16Sprite.drawString(String(amcodect, DEC), 258, 2); + if (amcodect != 0) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((amcodect != 0 ? "%" : textUI(30)), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(271)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(271)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(stationlistid, DEC), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(stationlistid, DEC), 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(216)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(216)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((scanmem ? textUI(218) : textUI(217)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((scanmem ? textUI(218) : textUI(217)), 298, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(267)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(267)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(memstoppos + 1, DEC), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(memstoppos + 1, DEC), 298, 2); break; } break; @@ -1195,117 +1195,117 @@ void ShowOneLine(byte position, byte item, bool selected) { case 5: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(182)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(182)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(198)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(198)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("dBµV", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(amagc, DEC), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("dBµV", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(amagc, DEC), 258, 2); break; case AUDIOSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(27)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(27)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (HighCutOffset != 0) FullLineSprite.drawString(String(HighCutOffset, DEC), 258, 2); - if (HighCutOffset != 0) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((HighCutOffset != 0 ? "dBμV" : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (HighCutOffset != 0) General16Sprite.drawString(String(HighCutOffset, DEC), 258, 2); + if (HighCutOffset != 0) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((HighCutOffset != 0 ? "dBμV" : textUI(30)), 298, 2); break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(173)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(173)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (batteryoptions) { - case BATTERY_NONE: FullLineSprite.drawString(textUI(30), 298, 2); break; - case BATTERY_VALUE: FullLineSprite.drawString(textUI(174), 298, 2); break; - case BATTERY_PERCENT: FullLineSprite.drawString(textUI(175), 298, 2); break; + case BATTERY_NONE: General16Sprite.drawString(textUI(30), 298, 2); break; + case BATTERY_VALUE: General16Sprite.drawString(textUI(174), 298, 2); break; + case BATTERY_PERCENT: General16Sprite.drawString(textUI(175), 298, 2); break; } break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(99)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(99)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (af) { - case 0: FullLineSprite.drawString(textUI(30), 298, 2); break; - case 1: FullLineSprite.drawString(String(textUI(31)) + " / REG " + String(textUI(31)), 298, 2); break; - case 2: FullLineSprite.drawString(String(textUI(31)) + " / REG " + String(textUI(30)), 298, 2); break; + case 0: General16Sprite.drawString(textUI(30), 298, 2); break; + case 1: General16Sprite.drawString(String(textUI(31)) + " / REG " + String(textUI(31)), 298, 2); break; + case 2: General16Sprite.drawString(String(textUI(31)) + " / REG " + String(textUI(30)), 298, 2); break; } break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(43)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(43)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((softmutefm ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((softmutefm ? textUI(31) : textUI(30)), 298, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(187)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(187)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(amcodectcount, DEC), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(amcodectcount, DEC), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(205)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(205)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((XDRGTKMuteScreen ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((XDRGTKMuteScreen ? textUI(31) : textUI(30)), 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(219)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(219)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (scancancel) { - case SCAN_CANCEL: FullLineSprite.drawString(textUI(30), 298, 2); break; - case CORRECTPI: FullLineSprite.drawString(textUI(220), 298, 2); break; - case SIGNAL: FullLineSprite.drawString(textUI(221), 298, 2); break; + case SCAN_CANCEL: General16Sprite.drawString(textUI(30), 298, 2); break; + case CORRECTPI: General16Sprite.drawString(textUI(220), 298, 2); break; + case SIGNAL: General16Sprite.drawString(textUI(221), 298, 2); break; } break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(268)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(268)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((mempionly ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((mempionly ? textUI(31) : textUI(30)), 298, 2); break; } break; @@ -1313,117 +1313,117 @@ void ShowOneLine(byte position, byte item, bool selected) { case 6: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(183)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(183)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(100)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(100)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (bandFM) { - case FM_BAND_ALL: FullLineSprite.drawString(textUI(105) + String(",") + textUI(106), 298, 2); break; - case FM_BAND_OIRT: FullLineSprite.drawString(textUI(106), 298, 2); break; - case FM_BAND_FM: FullLineSprite.drawString(textUI(105), 298, 2); break; - case FM_BAND_NONE: FullLineSprite.drawString(textUI(83), 298, 2); break; + case FM_BAND_ALL: General16Sprite.drawString(textUI(105) + String(",") + textUI(106), 298, 2); break; + case FM_BAND_OIRT: General16Sprite.drawString(textUI(106), 298, 2); break; + case FM_BAND_FM: General16Sprite.drawString(textUI(105), 298, 2); break; + case FM_BAND_NONE: General16Sprite.drawString(textUI(83), 298, 2); break; } break; case AUDIOSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(199)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(199)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (fmdeemphasis != DEEMPHASIS_NONE) FullLineSprite.drawString(String((fmdeemphasis == DEEMPHASIS_50 ? 50 : 75), DEC), 258, 2); - if (fmdeemphasis != DEEMPHASIS_NONE) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(((fmdeemphasis != DEEMPHASIS_NONE) != 0 ? "μs" : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (fmdeemphasis != DEEMPHASIS_NONE) General16Sprite.drawString(String((fmdeemphasis == DEEMPHASIS_50 ? 50 : 75), DEC), 258, 2); + if (fmdeemphasis != DEEMPHASIS_NONE) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(((fmdeemphasis != DEEMPHASIS_NONE) != 0 ? "μs" : textUI(30)), 298, 2); break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(98)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(98)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(unitString[unit], 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(unitString[unit], 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(176)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(176)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((radio.rds.rtbuffer ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((radio.rds.rtbuffer ? textUI(31) : textUI(30)), 298, 2); break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(65)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(65)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (fmnb != 0) FullLineSprite.drawString(String(fmnb, DEC), 258, 2); - if (fmnb != 0) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((fmnb != 0 ? "%" : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (fmnb != 0) General16Sprite.drawString(String(fmnb, DEC), 258, 2); + if (fmnb != 0) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((fmnb != 0 ? "%" : textUI(30)), 298, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(36)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(36)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (amgain != 0) FullLineSprite.drawString(String(amgain, DEC), 258, 2); - if (amgain != 0) FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((amgain != 0 ? "dB" : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (amgain != 0) General16Sprite.drawString(String(amgain, DEC), 258, 2); + if (amgain != 0) General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((amgain != 0 ? "dB" : textUI(30)), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(298)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(298)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((NTPoffset > -1 ? "+" : "") + String(NTPoffset, DEC), 298, 2); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("GMT", 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((NTPoffset > -1 ? "+" : "") + String(NTPoffset, DEC), 298, 2); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("GMT", 258, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(222)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(222)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((scanmute ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((scanmute ? textUI(31) : textUI(30)), 298, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(278)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(278)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (memdoublepi) { - case MEMPI_OFF: FullLineSprite.drawString(textUI(30), 298, 2); break; - case MEMPI_RANGE: FullLineSprite.drawString(textUI(279), 298, 2); break; - default: FullLineSprite.drawString(textUI(280), 298, 2); break; + case MEMPI_OFF: General16Sprite.drawString(textUI(30), 298, 2); break; + case MEMPI_RANGE: General16Sprite.drawString(textUI(279), 298, 2); break; + default: General16Sprite.drawString(textUI(280), 298, 2); break; } break; } @@ -1432,105 +1432,105 @@ void ShowOneLine(byte position, byte item, bool selected) { case 7: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(213)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(213)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(101)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(101)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (bandAM) { - case AM_BAND_ALL: FullLineSprite.drawString(textUI(102) + String(",") + textUI(103) + String(",") + textUI(104), 298, 2); break; - case AM_BAND_LW_MW: FullLineSprite.drawString(textUI(102) + String(",") + textUI(103), 298, 2); break; - case AM_BAND_LW_SW: FullLineSprite.drawString(textUI(102) + String(",") + textUI(104), 298, 2); break; - case AM_BAND_MW_SW: FullLineSprite.drawString(textUI(103) + String(",") + textUI(104), 298, 2); break; - case AM_BAND_LW: FullLineSprite.drawString(textUI(102), 298, 2); break; - case AM_BAND_MW: FullLineSprite.drawString(textUI(103), 298, 2); break; - case AM_BAND_SW: FullLineSprite.drawString(textUI(104), 298, 2); break; - case AM_BAND_NONE: FullLineSprite.drawString(textUI(83), 298, 2); break; + case AM_BAND_ALL: General16Sprite.drawString(textUI(102) + String(",") + textUI(103) + String(",") + textUI(104), 298, 2); break; + case AM_BAND_LW_MW: General16Sprite.drawString(textUI(102) + String(",") + textUI(103), 298, 2); break; + case AM_BAND_LW_SW: General16Sprite.drawString(textUI(102) + String(",") + textUI(104), 298, 2); break; + case AM_BAND_MW_SW: General16Sprite.drawString(textUI(103) + String(",") + textUI(104), 298, 2); break; + case AM_BAND_LW: General16Sprite.drawString(textUI(102), 298, 2); break; + case AM_BAND_MW: General16Sprite.drawString(textUI(103), 298, 2); break; + case AM_BAND_SW: General16Sprite.drawString(textUI(104), 298, 2); break; + case AM_BAND_NONE: General16Sprite.drawString(textUI(83), 298, 2); break; } break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(262)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(262)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((showclock ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((showclock ? textUI(31) : textUI(30)), 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(215)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((radio.rds.sortaf ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(215)), 6, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((radio.rds.sortaf ? textUI(31) : textUI(30)), 298, 2); break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(90)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(90)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("kHz", 300, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("kHz", 300, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (fmdefaultstepsize) { - case 0: FullLineSprite.drawString(String(FREQ_FM_STEP_50K * 10, DEC), 258, 2); break; - case 1: FullLineSprite.drawString(String(FREQ_FM_STEP_100K * 10, DEC), 258, 2); break; - case 2: FullLineSprite.drawString(String(FREQ_FM_STEP_200K * 10, DEC), 258, 2); break; + case 0: General16Sprite.drawString(String(FREQ_FM_STEP_50K * 10, DEC), 258, 2); break; + case 1: General16Sprite.drawString(String(FREQ_FM_STEP_100K * 10, DEC), 258, 2); break; + case 2: General16Sprite.drawString(String(FREQ_FM_STEP_200K * 10, DEC), 258, 2); break; } break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(169)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(169)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((mwstepsize ? "10" : "9"), 258, 2); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("kHz", 300, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((mwstepsize ? "10" : "9"), 258, 2); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("kHz", 300, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(297)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(297)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((autoDST ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((autoDST ? textUI(31) : textUI(30)), 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(296)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(296)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((autolog ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((autolog ? textUI(31) : textUI(30)), 298, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(82)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(82)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(fmscansens), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(fmscansens), 298, 2); break; } break; @@ -1538,91 +1538,91 @@ void ShowOneLine(byte position, byte item, bool selected) { case 8: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(270)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(270)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(224)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(224)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (longbandpress) { - case STANDBY: FullLineSprite.drawString(textUI(225), 298, 2); break; - case SCREENOFF: FullLineSprite.drawString(textUI(226), 298, 2); break; - default: FullLineSprite.drawString(textUI(227), 298, 2); break; + case STANDBY: General16Sprite.drawString(textUI(225), 298, 2); break; + case SCREENOFF: General16Sprite.drawString(textUI(226), 298, 2); break; + default: General16Sprite.drawString(textUI(227), 298, 2); break; } break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(77)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(77)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(Theme[CurrentTheme], 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(Theme[CurrentTheme], 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(203)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(203)), 6, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (radio.rds.fastps) { - case 0: FullLineSprite.drawString(textUI(30), 298, 2); break; - case 1: FullLineSprite.drawString(textUI(260), 298, 2); break; - case 2: FullLineSprite.drawString(textUI(261), 298, 2); break; + case 0: General16Sprite.drawString(textUI(30), 298, 2); break; + case 1: General16Sprite.drawString(textUI(260), 298, 2); break; + case 2: General16Sprite.drawString(textUI(261), 298, 2); break; } break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(206)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((fmsi ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(206)), 6, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((fmsi ? textUI(31) : textUI(30)), 298, 2); break; case AMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(82)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(82)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(amscansens), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(amscansens), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(93)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(93)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((clockampm ? "12" : "24"), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((clockampm ? "12" : "24"), 298, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(281)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((scanholdonsignal ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(281)), 6, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((scanholdonsignal ? textUI(31) : textUI(30)), 298, 2); break; case AUTOMEM: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(276)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(276)), 6, 2); break; } break; @@ -1630,306 +1630,306 @@ void ShowOneLine(byte position, byte item, bool selected) { case 9: switch (menupage) { case INDEX: - FullLineSprite.setTextDatum(TC_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(70)), 152, 2); + General16Sprite.setTextDatum(TC_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(70)), 152, 2); break; case MAINSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(81)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(81)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); + General16Sprite.setTextDatum(TR_DATUM); if (spispeed == 7) { - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(textUI(86), 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(textUI(86), 298, 2); } else { - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString("MHz", 298, 2); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(textUI(204)) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 258, 2); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString("MHz", 298, 2); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(textUI(204)) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 258, 2); } break; case DISPLAYSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(85)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(85)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(FreqFont[freqfont], 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(FreqFont[freqfont], 298, 2); break; case RDSSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(263)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((showlongps ? textUI(31) : textUI(30)), 298, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(263)), 6, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((showlongps ? textUI(31) : textUI(30)), 298, 2); break; case FMSETTINGS: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(82)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(82)), 6, 2); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString(String(fmscansens), 298, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(fmscansens), 298, 2); break; case CONNECTIVITY: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(41)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(41)), 6, 2); char PICT[5]; sprintf(PICT, "%04X", radio.rds.PICTlock); - FullLineSprite.setTextDatum(TR_DATUM); - FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - FullLineSprite.drawString((radio.rds.PICTlock == 0 ? textUI(30) : textUI(31)), 298, 2); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString((radio.rds.PICTlock != 0 ? String(PICT) : ""), 258, 2); + General16Sprite.setTextDatum(TR_DATUM); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString((radio.rds.PICTlock == 0 ? textUI(30) : textUI(31)), 298, 2); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString((radio.rds.PICTlock != 0 ? String(PICT) : ""), 258, 2); break; case DXMODE: - FullLineSprite.setTextDatum(TL_DATUM); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(removeNewline(textUI(292)), 6, 2); + General16Sprite.setTextDatum(TL_DATUM); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(removeNewline(textUI(292)), 6, 2); break; } break; } - FullLineSprite.pushSprite(8, 2 + position); + General16Sprite.pushSprite(8, 2 + position); } void ShowOneButton(byte position, byte item, bool selected) { switch (CurrentTheme) { - case 7: PSSprite.pushImage (0, 0, 150, 32, touchselback_wo); break; - default: PSSprite.pushImage (0, 0, 150, 32, touchselback); break; + case 7: SettingsSprite.pushImage (0, 0, 150, 32, touchselback_wo); break; + default: SettingsSprite.pushImage (0, 0, 150, 32, touchselback); break; } switch (item) { case 0: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(177))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(177))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(108))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(108))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (hardwaremodel) { - case BASE_ILI9341: PSSprite.drawString(textUI(109), 75, 15); break; - case PORTABLE_ILI9341: PSSprite.drawString(textUI(110), 75, 15); break; - case PORTABLE_TOUCH_ILI9341: PSSprite.drawString(textUI(111), 75, 15); break; + case BASE_ILI9341: SettingsSprite.drawString(textUI(109), 75, 15); break; + case PORTABLE_ILI9341: SettingsSprite.drawString(textUI(110), 75, 15); break; + case PORTABLE_TOUCH_ILI9341: SettingsSprite.drawString(textUI(111), 75, 15); break; } break; case AUDIOSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(20))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(20))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("dB", 77, 15); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((VolSet > 0 ? "+" : "") + String(VolSet, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("dB", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((VolSet > 0 ? "+" : "") + String(VolSet, DEC), 73, 15); break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(39))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(39))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(textUI(0), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(textUI(0), 75, 15); break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(38))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(38))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (showrdserrors) { - case 0: PSSprite.drawString(textUI(30), 75, 15); break; - case 1: PSSprite.drawString(textUI(200), 75, 15); break; - case 2: PSSprite.drawString(textUI(201), 75, 15); break; + case 0: SettingsSprite.drawString(textUI(30), 75, 15); break; + case 1: SettingsSprite.drawString(textUI(200), 75, 15); break; + case 2: SettingsSprite.drawString(textUI(201), 75, 15); break; } break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(21))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(21))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("MHz", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(ConverterSet, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("MHz", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(ConverterSet, DEC), 73, 15); break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(44))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(44))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((softmuteam ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((softmuteam ? textUI(31) : textUI(30)), 75, 15); break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(5))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(5))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((USBmode ? "RDS Spy" : "XDRGTK"), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((USBmode ? "RDS Spy" : "XDRGTK"), 75, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(212))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(212))), 75, 8); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(269))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(269))), 75, 8); break; } break; case 1: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(178))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(178))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(107))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(107))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((touchrotating ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((touchrotating ? textUI(31) : textUI(30)), 75, 15); break; case AUDIOSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(45))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(45))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((edgebeep ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((edgebeep ? textUI(31) : textUI(30)), 75, 15); break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(29))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(29))), 75, 1); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(ContrastSet, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("%", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(ContrastSet, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("%", 77, 15); break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(46))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(46))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (radio.rds.region) { - case 0: PSSprite.drawString(textUI(47), 75, 15); break; - case 1: PSSprite.drawString(String(textUI(48)) + " DB", 75, 15); break; - case 2: PSSprite.drawString(textUI(48), 75, 15); break; - case 3: PSSprite.drawString(textUI(300), 75, 15); break; + case 0: SettingsSprite.drawString(textUI(47), 75, 15); break; + case 1: SettingsSprite.drawString(String(textUI(48)) + " DB", 75, 15); break; + case 2: SettingsSprite.drawString(textUI(48), 75, 15); break; + case 3: SettingsSprite.drawString(textUI(300), 75, 15); break; } break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(22))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(22))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("MHz", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(LowEdgeSet / 10 + ConverterSet, DEC) + "." + String(LowEdgeSet % 10 + ConverterSet, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("MHz", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(LowEdgeSet / 10 + ConverterSet, DEC) + "." + String(LowEdgeSet % 10 + ConverterSet, DEC), 73, 15); break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(64))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(64))), 75, 1); if (amnb == 0) { - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(amnb, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("%", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(amnb, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("%", 77, 15); } break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(wifi ? " IP: " + String(WiFi.localIP().toString()) : textUI(51))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(wifi ? " IP: " + String(WiFi.localIP().toString()) : textUI(51))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((wifi ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((wifi ? textUI(31) : textUI(30)), 75, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(209))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(209))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(scanstart + 1, DEC), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(scanstart + 1, DEC), 75, 15); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(264))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(264))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("MHz", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(memstartfreq / 10 + ConverterSet, DEC) + "." + String(memstartfreq % 10 + ConverterSet, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("MHz", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(memstartfreq / 10 + ConverterSet, DEC) + "." + String(memstartfreq % 10 + ConverterSet, DEC), 73, 15); break; } break; @@ -1937,112 +1937,112 @@ void ShowOneButton(byte position, byte item, bool selected) { case 2: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(179))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(179))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(75))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(75))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (tot == 0) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(tot), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString(textUI(80), 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(tot), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString(textUI(80), 77, 15); } break; case AUDIOSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(67))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(67))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((audiomode ? "MPX" : "Stereo"), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((audiomode ? "MPX" : "Stereo"), 75, 15); break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(63))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(63))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((showmodulation ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((showmodulation ? textUI(31) : textUI(30)), 75, 15); break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(49))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(49))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (radio.underscore) { - case 0: PSSprite.drawString(textUI(30), 75, 15); break; - case 1: PSSprite.drawString(textUI(50), 75, 15); break; - case 2: PSSprite.drawString(textUI(31), 75, 15); break; + case 0: SettingsSprite.drawString(textUI(30), 75, 15); break; + case 1: SettingsSprite.drawString(textUI(50), 75, 15); break; + case 2: SettingsSprite.drawString(textUI(31), 75, 15); break; } break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(23))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(23))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("MHz", 77, 15); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(HighEdgeSet / 10 + ConverterSet, DEC) + "." + String(HighEdgeSet % 10 + ConverterSet, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("MHz", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(HighEdgeSet / 10 + ConverterSet, DEC) + "." + String(HighEdgeSet % 10 + ConverterSet, DEC), 73, 15); break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(97))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(97))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("dB", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString((AMLevelOffset > 0 ? "+" : "") + String(AMLevelOffset, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("dB", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString((AMLevelOffset > 0 ? "+" : "") + String(AMLevelOffset, DEC), 73, 15); break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(52))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(52))), 75, 8); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(210))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(210))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(scanstop + 1, DEC), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(scanstop + 1, DEC), 75, 15); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(265))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(265))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("MHz", 77, 15); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(memstopfreq / 10 + ConverterSet, DEC) + "." + String(memstopfreq % 10 + ConverterSet, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("MHz", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(memstopfreq / 10 + ConverterSet, DEC) + "." + String(memstopfreq % 10 + ConverterSet, DEC), 73, 15); break; } break; @@ -2050,114 +2050,114 @@ void ShowOneButton(byte position, byte item, bool selected) { case 3: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(180))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(180))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(62))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(62))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - if (autosquelch) PSSprite.drawString(textUI(86), 75, 15); else PSSprite.drawString((usesquelch ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (autosquelch) SettingsSprite.drawString(textUI(86), 75, 15); else SettingsSprite.drawString((usesquelch ? textUI(31) : textUI(30)), 75, 15); break; case AUDIOSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(25))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(25))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (StereoLevel == 0) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(StereoLevel, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("dBμV", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(StereoLevel, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("dBμV", 77, 15); } break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(91))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(91))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (!screensaverset) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(screensaverOptions[screensaverset], DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString(textUI(92), 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(screensaverOptions[screensaverset], DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString(textUI(92), 77, 15); } break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(60))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(60))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((radio.rds.filter ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((radio.rds.filter ? textUI(31) : textUI(30)), 75, 15); break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(24))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(24))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("dB", 77, 15); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((LevelOffset > 0 ? "+" : "") + String(LevelOffset, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("dB", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((LevelOffset > 0 ? "+" : "") + String(LevelOffset, DEC), 73, 15); break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(59))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(59))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((showSWMIBand ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((showSWMIBand ? textUI(31) : textUI(30)), 75, 15); break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(58))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(58))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((wifi ? String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(subnetclient, DEC) : "-"), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((wifi ? String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(subnetclient, DEC) : "-"), 75, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(211))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(211))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(removeNewline(textUI(92)), 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString((scanhold == 0 ? "0.5" : String(scanhold, DEC)), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(removeNewline(textUI(92)), 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString((scanhold == 0 ? "0.5" : String(scanhold, DEC)), 73, 15); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(266))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(266))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(memstartpos + 1, DEC), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(memstartpos + 1, DEC), 75, 15); break; } break; @@ -2165,116 +2165,116 @@ void ShowOneButton(byte position, byte item, bool selected) { case 4: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(181))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(181))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(37))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(37))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("dBµV", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(fmagc, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("dBµV", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(fmagc, DEC), 73, 15); break; case AUDIOSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(26))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(26))), 75, 1); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(HighCutLevel * 100, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("Hz", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(HighCutLevel * 100, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("Hz", 77, 15); break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(74))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(74))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (poweroptions) { - case LCD_OFF: PSSprite.drawString(textUI(76), 75, 15); break; - case LCD_BRIGHTNESS_1_PERCENT: PSSprite.drawString(textUI(94), 75, 15); break; - case LCD_BRIGHTNESS_A_QUARTER: PSSprite.drawString(textUI(95), 75, 15); break; - case LCD_BRIGHTNESS_HALF: PSSprite.drawString(textUI(96), 75, 15); break; + case LCD_OFF: SettingsSprite.drawString(textUI(76), 75, 15); break; + case LCD_BRIGHTNESS_1_PERCENT: SettingsSprite.drawString(textUI(94), 75, 15); break; + case LCD_BRIGHTNESS_A_QUARTER: SettingsSprite.drawString(textUI(95), 75, 15); break; + case LCD_BRIGHTNESS_HALF: SettingsSprite.drawString(textUI(96), 75, 15); break; } break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(61))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(61))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((radio.rds.pierrors ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((radio.rds.pierrors ? textUI(31) : textUI(30)), 75, 15); break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(28))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(28))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("dBμV", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(LowLevelSet, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("dBμV", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(LowLevelSet, DEC), 73, 15); break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(185))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(185))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (amcodect == 0) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(amcodect, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("%", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(amcodect, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("%", 77, 15); } break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(271))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(271))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(stationlistid, DEC), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(stationlistid, DEC), 75, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(216))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(216))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((scanmem ? textUI(218) : textUI(217)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((scanmem ? textUI(218) : textUI(217)), 75, 15); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(267))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(267))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(memstoppos + 1, DEC), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(memstoppos + 1, DEC), 75, 15); break; } break; @@ -2282,116 +2282,116 @@ void ShowOneButton(byte position, byte item, bool selected) { case 5: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(182))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(182))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(198))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(198))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("dBµV", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(amagc, DEC), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("dBµV", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(amagc, DEC), 73, 15); break; case AUDIOSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(27))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(27))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (HighCutOffset == 0) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(HighCutOffset, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("dBμV", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(HighCutOffset, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("dBμV", 77, 15); } break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(173))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(173))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (batteryoptions) { - case BATTERY_NONE: PSSprite.drawString(textUI(30), 75, 15); break; - case BATTERY_VALUE: PSSprite.drawString(textUI(174), 75, 15); break; - case BATTERY_PERCENT: PSSprite.drawString(textUI(175), 75, 15); break; + case BATTERY_NONE: SettingsSprite.drawString(textUI(30), 75, 15); break; + case BATTERY_VALUE: SettingsSprite.drawString(textUI(174), 75, 15); break; + case BATTERY_PERCENT: SettingsSprite.drawString(textUI(175), 75, 15); break; } break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(99))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(99))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (af) { - case 0: PSSprite.drawString(textUI(30), 75, 15); break; - case 1: PSSprite.drawString(String(textUI(31)) + " / REG " + String(textUI(31)), 75, 15); break; - case 2: PSSprite.drawString(String(textUI(31)) + " / REG " + String(textUI(30)), 75, 15); break; + case 0: SettingsSprite.drawString(textUI(30), 75, 15); break; + case 1: SettingsSprite.drawString(String(textUI(31)) + " / REG " + String(textUI(31)), 75, 15); break; + case 2: SettingsSprite.drawString(String(textUI(31)) + " / REG " + String(textUI(30)), 75, 15); break; } break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(43))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(43))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((softmutefm ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((softmutefm ? textUI(31) : textUI(30)), 75, 15); break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(187))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(187))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(amcodectcount, DEC), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(amcodectcount, DEC), 75, 15); break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(205))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(205))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((XDRGTKMuteScreen ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((XDRGTKMuteScreen ? textUI(31) : textUI(30)), 75, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(219))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(219))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (scancancel) { - case 0: PSSprite.drawString(textUI(30), 75, 15); break; - case CORRECTPI: PSSprite.drawString(textUI(220), 75, 15); break; - case SIGNAL: PSSprite.drawString(textUI(221), 75, 15); break; + case 0: SettingsSprite.drawString(textUI(30), 75, 15); break; + case CORRECTPI: SettingsSprite.drawString(textUI(220), 75, 15); break; + case SIGNAL: SettingsSprite.drawString(textUI(221), 75, 15); break; } break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(268))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(268))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((mempionly ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((mempionly ? textUI(31) : textUI(30)), 75, 15); break; } break; @@ -2399,128 +2399,128 @@ void ShowOneButton(byte position, byte item, bool selected) { case 6: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(183))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(183))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(100))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(100))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (bandFM) { - case FM_BAND_ALL: PSSprite.drawString(textUI(105) + String(",") + textUI(106), 75, 15); break; - case FM_BAND_OIRT: PSSprite.drawString(textUI(106), 75, 15); break; - case FM_BAND_FM: PSSprite.drawString(textUI(105), 75, 15); break; - case FM_BAND_NONE: PSSprite.drawString(textUI(83), 75, 15); break; + case FM_BAND_ALL: SettingsSprite.drawString(textUI(105) + String(",") + textUI(106), 75, 15); break; + case FM_BAND_OIRT: SettingsSprite.drawString(textUI(106), 75, 15); break; + case FM_BAND_FM: SettingsSprite.drawString(textUI(105), 75, 15); break; + case FM_BAND_NONE: SettingsSprite.drawString(textUI(83), 75, 15); break; } break; case AUDIOSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(199))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(199))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (fmdeemphasis == DEEMPHASIS_NONE) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String((fmdeemphasis == DEEMPHASIS_50 ? 50 : 75), DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("μs", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String((fmdeemphasis == DEEMPHASIS_50 ? 50 : 75), DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("μs", 77, 15); } break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(98))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(98))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(unitString[unit], 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(unitString[unit], 75, 15); break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(176))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(176))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((radio.rds.rtbuffer ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((radio.rds.rtbuffer ? textUI(31) : textUI(30)), 75, 15); break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(65))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(65))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (fmnb == 0) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString(String(fmnb, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString("%", 77, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString(String(fmnb, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString("%", 77, 15); } break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(36))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(36))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); if (amgain == 0) { - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.drawString(textUI(30), 75, 15); } else { - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(amgain, DEC), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("dB", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(amgain, DEC), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("dB", 77, 15); } break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(298))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(298))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((NTPoffset > -1 ? "+" : "") + String(NTPoffset, DEC), 77, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString("GMT", 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((NTPoffset > -1 ? "+" : "") + String(NTPoffset, DEC), 77, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString("GMT", 73, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(222))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(222))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((scanmute ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((scanmute ? textUI(31) : textUI(30)), 75, 15); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(278))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(278))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (memdoublepi) { - case MEMPI_OFF: PSSprite.drawString(textUI(30), 75, 15); break; - case MEMPI_RANGE: PSSprite.drawString(textUI(279), 75, 15); break; - default: PSSprite.drawString(textUI(280), 75, 15); break; + case MEMPI_OFF: SettingsSprite.drawString(textUI(30), 75, 15); break; + case MEMPI_RANGE: SettingsSprite.drawString(textUI(279), 75, 15); break; + default: SettingsSprite.drawString(textUI(280), 75, 15); break; } break; } @@ -2529,102 +2529,102 @@ void ShowOneButton(byte position, byte item, bool selected) { case 7: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(213))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(213))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(101))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(101))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (bandAM) { - case AM_BAND_ALL: PSSprite.drawString(textUI(102) + String(",") + textUI(103) + String(",") + textUI(104), 75, 15); break; - case AM_BAND_LW_MW: PSSprite.drawString(textUI(102) + String(",") + textUI(103), 75, 15); break; - case AM_BAND_LW_SW: PSSprite.drawString(textUI(102) + String(",") + textUI(104), 75, 15); break; - case AM_BAND_MW_SW: PSSprite.drawString(textUI(103) + String(",") + textUI(104), 75, 15); break; - case AM_BAND_LW: PSSprite.drawString(textUI(102), 75, 15); break; - case AM_BAND_MW: PSSprite.drawString(textUI(103), 75, 15); break; - case AM_BAND_SW: PSSprite.drawString(textUI(104), 75, 15); break; - case AM_BAND_NONE: PSSprite.drawString(textUI(83), 75, 15); break; + case AM_BAND_ALL: SettingsSprite.drawString(textUI(102) + String(",") + textUI(103) + String(",") + textUI(104), 75, 15); break; + case AM_BAND_LW_MW: SettingsSprite.drawString(textUI(102) + String(",") + textUI(103), 75, 15); break; + case AM_BAND_LW_SW: SettingsSprite.drawString(textUI(102) + String(",") + textUI(104), 75, 15); break; + case AM_BAND_MW_SW: SettingsSprite.drawString(textUI(103) + String(",") + textUI(104), 75, 15); break; + case AM_BAND_LW: SettingsSprite.drawString(textUI(102), 75, 15); break; + case AM_BAND_MW: SettingsSprite.drawString(textUI(103), 75, 15); break; + case AM_BAND_SW: SettingsSprite.drawString(textUI(104), 75, 15); break; + case AM_BAND_NONE: SettingsSprite.drawString(textUI(83), 75, 15); break; } break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(262))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(262))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((showclock ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((showclock ? textUI(31) : textUI(30)), 75, 15); break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(215))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(215))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((radio.rds.sortaf ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((radio.rds.sortaf ? textUI(31) : textUI(30)), 75, 15); break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(90))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(90))), 75, 1); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("kHz", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("kHz", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); switch (fmdefaultstepsize) { - case 0: PSSprite.drawString(String(FREQ_FM_STEP_50K * 10, DEC), 73, 15); break; - case 1: PSSprite.drawString(String(FREQ_FM_STEP_100K * 10, DEC), 73, 15); break; - case 2: PSSprite.drawString(String(FREQ_FM_STEP_200K * 10, DEC), 73, 15); break; + case 0: SettingsSprite.drawString(String(FREQ_FM_STEP_50K * 10, DEC), 73, 15); break; + case 1: SettingsSprite.drawString(String(FREQ_FM_STEP_100K * 10, DEC), 73, 15); break; + case 2: SettingsSprite.drawString(String(FREQ_FM_STEP_200K * 10, DEC), 73, 15); break; } break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(169))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(169))), 75, 1); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((mwstepsize ? "10" : "9"), 73, 15); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.drawString("kHz", 77, 15); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((mwstepsize ? "10" : "9"), 73, 15); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.drawString("kHz", 77, 15); break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(297))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(297))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((autoDST ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((autoDST ? textUI(31) : textUI(30)), 75, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(296))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(296))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((autolog ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((autolog ? textUI(31) : textUI(30)), 75, 15); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(82))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(82))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(fmscansens), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(fmscansens), 75, 15); break; } break; @@ -2632,87 +2632,87 @@ void ShowOneButton(byte position, byte item, bool selected) { case 8: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(270))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(270))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(224))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(224))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (longbandpress) { - case STANDBY: PSSprite.drawString(textUI(225), 75, 15); break; - case SCREENOFF: PSSprite.drawString(textUI(226), 75, 15); break; - default: PSSprite.drawString(textUI(227), 75, 15); break; + case STANDBY: SettingsSprite.drawString(textUI(225), 75, 15); break; + case SCREENOFF: SettingsSprite.drawString(textUI(226), 75, 15); break; + default: SettingsSprite.drawString(textUI(227), 75, 15); break; } break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(77))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(77))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(Theme[CurrentTheme], 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(Theme[CurrentTheme], 75, 15); break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(203))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(203))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); switch (radio.rds.fastps) { - case 0: PSSprite.drawString(textUI(30), 75, 15); break; - case 1: PSSprite.drawString(textUI(260), 75, 15); break; - case 2: PSSprite.drawString(textUI(261), 75, 15); break; + case 0: SettingsSprite.drawString(textUI(30), 75, 15); break; + case 1: SettingsSprite.drawString(textUI(260), 75, 15); break; + case 2: SettingsSprite.drawString(textUI(261), 75, 15); break; } break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(206))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(206))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((fmsi ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((fmsi ? textUI(31) : textUI(30)), 75, 15); break; case AMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(82))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(82))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(amscansens), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(amscansens), 75, 15); break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(93))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(93))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((clockampm ? "12" : "24"), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((clockampm ? "12" : "24"), 75, 15); break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(281))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(281))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((scanholdonsignal ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((scanholdonsignal ? textUI(31) : textUI(30)), 75, 15); break; case AUTOMEM: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(276))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(276))), 75, 8); break; } break; @@ -2720,88 +2720,88 @@ void ShowOneButton(byte position, byte item, bool selected) { case 9: switch (menupage) { case INDEX: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(70))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(70))), 75, 8); break; case MAINSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(81))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(81))), 75, 1); if (spispeed == 7) { - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(textUI(86), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(textUI(86), 75, 15); } else { - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString("MHz", 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(textUI(204)) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString("MHz", 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(textUI(204)) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 73, 15); } break; case DISPLAYSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(85))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(85))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(FreqFont[freqfont], 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(FreqFont[freqfont], 75, 15); break; case RDSSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(263))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(263))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString((showlongps ? textUI(31) : textUI(30)), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString((showlongps ? textUI(31) : textUI(30)), 75, 15); break; case FMSETTINGS: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(82))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(82))), 75, 1); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.drawString(String(fmscansens), 75, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.drawString(String(fmscansens), 75, 15); break; case CONNECTIVITY: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(41))), 75, 1); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(41))), 75, 1); if (radio.rds.PICTlock == 0) { - PSSprite.setTextDatum(TC_DATUM); - PSSprite.drawString(textUI(30), 75, 15); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.drawString(textUI(30), 75, 15); } else { char PICT[5]; sprintf(PICT, "%04X", radio.rds.PICTlock); - PSSprite.setTextDatum(TL_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(textUI(31), 77, 15); - PSSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - PSSprite.setTextDatum(TR_DATUM); - PSSprite.drawString(String(PICT), 73, 15); + SettingsSprite.setTextDatum(TL_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(textUI(31), 77, 15); + SettingsSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + SettingsSprite.setTextDatum(TR_DATUM); + SettingsSprite.drawString(String(PICT), 73, 15); } break; case DXMODE: - PSSprite.setTextDatum(TC_DATUM); - PSSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - PSSprite.drawString(shortLine(removeNewline(textUI(292))), 75, 8); + SettingsSprite.setTextDatum(TC_DATUM); + SettingsSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + SettingsSprite.drawString(shortLine(removeNewline(textUI(292))), 75, 8); break; } break; } - PSSprite.pushSprite((position > ITEM5 ? 163 : 8), (position * 2) - 22 - (position > ITEM5 ? 200 : 0)); + SettingsSprite.pushSprite((position > ITEM5 ? 163 : 8), (position * 2) - 22 - (position > ITEM5 ? 200 : 0)); if (selected) { tft.drawRect((position > ITEM5 ? 163 : 8), (position * 2) - 22 - (position > ITEM5 ? 200 : 0), 150, 32, PrimaryColor); @@ -5622,8 +5622,8 @@ void drawButton(const char* text, byte button_number, bool active, bool selected String shortLine(String text) { String tempText = text; - if (PSSprite.textWidth(tempText + "...") > 155) { - while (PSSprite.textWidth(tempText + "...") > 155 && tempText.length() > 0) { + if (SettingsSprite.textWidth(tempText + "...") > 155) { + while (SettingsSprite.textWidth(tempText + "...") > 155 && tempText.length() > 0) { int lastCharIndex = tempText.length() - 1; while (lastCharIndex > 0 && (tempText[lastCharIndex] & 0xC0) == 0x80) lastCharIndex--; tempText = tempText.substring(0, lastCharIndex); diff --git a/src/main.cpp b/src/main.cpp index 2e20e3b..3fc27fa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -981,8 +981,6 @@ void NumpadProcess(int num) { if (spispeed == 7) tft.setSPISpeed(40); submenu = true; menu = true; - PSSprite.unloadFont(); - if (language == LANGUAGE_CHS) PSSprite.loadFont(FONT16_CHS); else PSSprite.loadFont(FONT16); BuildMenu(); } else if (num == 13) { if (freq_in != 0) { @@ -1068,9 +1066,6 @@ void endMenu() { if (USBmode) Serial.begin(19200); else Serial.begin(115200); leave = true; - PSSprite.unloadFont(); - if (language == LANGUAGE_CHS) PSSprite.loadFont(FONT28_CHS); else PSSprite.loadFont(FONT28); - PSSprite.setTextDatum(TL_DATUM); BuildDisplay(); SelectBand(); } @@ -1290,20 +1285,13 @@ void setup() { FrequencySprite.setTextDatum(TR_DATUM); FrequencySprite.setSwapBytes(true); - RDSSprite.createSprite(165, 19); - RDSSprite.setSwapBytes(true); + General16Sprite.createSprite(308, 28); + General16Sprite.setSwapBytes(true); - PTYSprite.createSprite(160, 19); - PTYSprite.setSwapBytes(true); - - PSSprite.createSprite(150, 32); - PSSprite.setSwapBytes(true); - - SquelchSprite.createSprite(27, 19); - SquelchSprite.setSwapBytes(true); - - FullLineSprite.createSprite(308, 19); - FullLineSprite.setSwapBytes(true); + General28Sprite.createSprite(150, 32); + General28Sprite.setSwapBytes(true); + SettingsSprite.createSprite(150, 32); + SettingsSprite.setSwapBytes(true); OneBigLineSprite.createSprite(270, 30); OneBigLineSprite.setSwapBytes(true); @@ -2421,8 +2409,6 @@ void ModeButtonPress() { menupage = INDEX; menuitem = 0; if (spispeed == 7) tft.setSPISpeed(40); - PSSprite.unloadFont(); - if (language == LANGUAGE_CHS) PSSprite.loadFont(FONT16_CHS); else PSSprite.loadFont(FONT16); BuildMenu(); freq_in = 0; menu = true; @@ -2465,8 +2451,6 @@ void ModeButtonPress() { menuoption = ITEM1; menupage = INDEX; menuitem = 0; - PSSprite.unloadFont(); - if (language == LANGUAGE_CHS) PSSprite.loadFont(FONT16_CHS); else PSSprite.loadFont(FONT16); BuildMenu(); freq_in = 0; } @@ -2982,14 +2966,16 @@ void ShowFreq(int mode) { if (!rdsflagreset && !screenmute && !afscreen && !rdsstatscreen) { ShowRDSLogo(false); if (!advancedRDS) { - FullLineSprite.fillSprite(BackgroundColor); - FullLineSprite.drawLine(283, 0, 283, 19, FrameColor); - FullLineSprite.pushSprite(36, 220); + General16Sprite.fillSprite(TFT_TRANSPARENT); + General16Sprite.fillRect(0, 0, 308, 19, BackgroundColor); + General16Sprite.drawLine(283, 0, 283, 19, FrameColor); + General16Sprite.pushSprite(36, 220, TFT_TRANSPARENT); tft.fillCircle(314, 223, 2, GreyoutColor); tft.fillCircle(314, 234, 2, GreyoutColor); } else { - RDSSprite.fillSprite(BackgroundColor); - RDSSprite.pushSprite(36, 220); + General16Sprite.fillSprite(TFT_TRANSPARENT); + General16Sprite.fillRect(0, 0, 165, 19, BackgroundColor); + General16Sprite.pushSprite(36, 220, TFT_TRANSPARENT); tft.fillCircle(314, 223, 2, GreyoutColor); tft.fillCircle(314, 234, 2, GreyoutColor); } @@ -3311,17 +3297,16 @@ void doSquelch() { } } } else { - if (language == LANGUAGE_CHS) SquelchSprite.loadFont(FONT16_CHS); else SquelchSprite.loadFont(FONT16); - if (!XDRGTKUSB && !XDRGTKTCP && usesquelch && (!scandxmode || (scandxmode && !scanmute))) { if (!screenmute && usesquelch && !advancedRDS && !afscreen && !rdsstatscreen) { if (!BWtune && !menu && (Squelch > Squelchold + 2 || Squelch < Squelchold - 2)) { - SquelchSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - SquelchSprite.fillSprite(BackgroundColor); - if (Squelch == -100) SquelchSprite.drawString("--", 0, 0); - else if (Squelch == 920) SquelchSprite.drawString("ST", 0, 0); - else SquelchSprite.drawString(String(SquelchShow), 0, 0); - SquelchSprite.pushSprite(223, 147); + General16Sprite.fillSprite(TFT_TRANSPARENT); + General16Sprite.fillRect(0, 0, 27, 19, BackgroundColor); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + if (Squelch == -100) General16Sprite.drawString("--", 0, 0); + else if (Squelch == 920) General16Sprite.drawString("ST", 0, 0); + else General16Sprite.drawString(String(SquelchShow), 0, 0); + General16Sprite.pushSprite(223, 147, TFT_TRANSPARENT); Squelchold = Squelch; } } @@ -3352,13 +3337,14 @@ void doSquelch() { } if (!screenmute && usesquelch && !advancedRDS && !afscreen && !rdsstatscreen) { if (Squelch != Squelchold) { - SquelchSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - SquelchSprite.fillSprite(BackgroundColor); + General16Sprite.fillSprite(TFT_TRANSPARENT); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.fillRect(0, 0, 27, 19, BackgroundColor); - if (Squelch == -1) SquelchSprite.drawString("ST", 0, 0); - else if (Squelch == 0) SquelchSprite.drawString("--", 0, 0); - else SquelchSprite.drawString(String(SquelchShow), 0, 0); - if (Squelch != Squelchold) SquelchSprite.pushSprite(223, 147); + if (Squelch == -1) General16Sprite.drawString("ST", 0, 0); + else if (Squelch == 0) General16Sprite.drawString("--", 0, 0); + else General16Sprite.drawString(String(SquelchShow), 0, 0); + if (Squelch != Squelchold) General16Sprite.pushSprite(223, 147, TFT_TRANSPARENT); Squelchold = Squelch; } } @@ -3387,7 +3373,6 @@ void doSquelch() { } } } - SquelchSprite.unloadFont(); } void doBW() { @@ -3927,32 +3912,25 @@ void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, int colo void UpdateFonts(byte mode) { switch (mode) { case 0: - RDSSprite.unloadFont(); - PTYSprite.unloadFont(); - PSSprite.unloadFont(); - FullLineSprite.unloadFont(); + General28Sprite.unloadFont(); + SettingsSprite.unloadFont(); OneBigLineSprite.unloadFont(); if (language == LANGUAGE_CHS) { - RDSSprite.loadFont(FONT16_CHS); - PTYSprite.loadFont(FONT16_CHS); - if (menu) PSSprite.loadFont(FONT16_CHS); else PSSprite.loadFont(FONT28_CHS); - FullLineSprite.loadFont(FONT16_CHS); + General28Sprite.loadFont(FONT28_CHS); + SettingsSprite.loadFont(FONT16_CHS); OneBigLineSprite.loadFont(FONT28_CHS); } else { - RDSSprite.loadFont(FONT16); - PTYSprite.loadFont(FONT16); - if (menu) PSSprite.loadFont(FONT16); else PSSprite.loadFont(FONT28); - FullLineSprite.loadFont(FONT16); + General16Sprite.loadFont(FONT16); + General28Sprite.loadFont(FONT28); + SettingsSprite.loadFont(FONT16); OneBigLineSprite.loadFont(FONT28); } break; case 1: - FullLineSprite.unloadFont(); OneBigLineSprite.unloadFont(); - RDSSprite.unloadFont(); - PTYSprite.unloadFont(); - PSSprite.unloadFont(); + General28Sprite.unloadFont(); + SettingsSprite.unloadFont(); break; } } @@ -4032,12 +4010,12 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui switch (CurrentTheme) { case 7: SignalSprite.pushImage(-107, -95, 292, 170, popupbackground_wo); - SquelchSprite.pushImage(-177, -135, 292, 170, popupbackground_wo); + General16Sprite.pushImage(-177, -135, 292, 170, popupbackground_wo); break; default: SignalSprite.pushImage(-107, -95, 292, 170, popupbackground); - SquelchSprite.pushImage(-177, -135, 292, 170, popupbackground); + General16Sprite.pushImage(-177, -135, 292, 170, popupbackground); break; } @@ -4048,10 +4026,11 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui SignalSprite.unloadFont(); SignalSprite.pushSprite(120, 125); - if (language == LANGUAGE_CHS) SquelchSprite.loadFont(FONT16_CHS); else SquelchSprite.loadFont(FONT16); - SquelchSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); - SquelchSprite.drawString(String(counter), 0, 0); - SquelchSprite.pushSprite(200, 155); + General16Sprite.fillSprite(TFT_TRANSPARENT); + General16Sprite.fillRect(0, 0, 27, 19, BackgroundColor); + General16Sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); + General16Sprite.drawString(String(counter), 0, 0); + General16Sprite.pushSprite(200, 155, TFT_TRANSPARENT); tft.fillRect(60, 110, 2 * percent, 6, BarInsignificantColor); diff --git a/src/rds.cpp b/src/rds.cpp index f1c2d9d..b6ab025 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -158,10 +158,10 @@ void readRds() { } if (!radio.rds.hasLongPS) { - PSSprite.fillSprite(BackgroundColor); - PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); - PSSprite.drawString(PSold, 0, 2); - PSSprite.pushSprite(36, advancedRDS ? 72 : 185); + General28Sprite.fillSprite(BackgroundColor); + General28Sprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); + General28Sprite.drawString(PSold, 0, 2); + General28Sprite.pushSprite(36, advancedRDS ? 72 : 185); } } @@ -189,18 +189,18 @@ void readRds() { } if (!radio.rds.hasLongPS) { - PSSprite.fillSprite(BackgroundColor); + General28Sprite.fillSprite(BackgroundColor); if ((ps12errorold || ps34errorold || ps56errorold || ps78errorold) && radio.ps_process) { for (uint8_t i = 0; i < 7; i++) { bool error = (i < 2 && ps12errorold) || (i < 4 && ps34errorold) || (i < 6 && ps56errorold) || ps78errorold; - PSSprite.setTextColor(error ? RDSDropoutColor : RDSColor, RDSColorSmooth, false); - PSSprite.drawString(radio.rds.stationName.substring(i, i + 1), i == 0 ? 0 : lengths[i - 1], 2); + General28Sprite.setTextColor(error ? RDSDropoutColor : RDSColor, RDSColorSmooth, false); + General28Sprite.drawString(radio.rds.stationName.substring(i, i + 1), i == 0 ? 0 : lengths[i - 1], 2); } } else { - PSSprite.setTextColor(RDSColor, RDSColorSmooth, false); - PSSprite.drawString(PSold, 0, 2); + General28Sprite.setTextColor(RDSColor, RDSColorSmooth, false); + General28Sprite.drawString(PSold, 0, 2); } - PSSprite.pushSprite(36, advancedRDS ? 72 : 185); + General28Sprite.pushSprite(36, advancedRDS ? 72 : 185); } tft.fillCircle(314, 223, 2, GreyoutColor); @@ -406,14 +406,15 @@ void showPI() { void showPTY() { if(radio.rds.PTY.changed(0)) { String PTYString = String(radio.rds.PTY) + "/" + (radio.rds.region != 0 ? (radio.rds.region == 0 ? PTY_EU[radio.rds.PTY] : PTY_USA[radio.rds.PTY]) : textUI(228 + radio.rds.PTY)); - PTYSprite.fillSprite(BackgroundColor); - if(RDSstatus) PTYSprite.setTextColor(RDSColor, RDSColorSmooth, false); - else PTYSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); - if(band < BAND_GAP) PTYSprite.drawString(PTYString, 0, 2); // only draw it on fm + General16Sprite.fillSprite(TFT_TRANSPARENT); + General16Sprite.fillRect(0, 0, 160, 19, BackgroundColor); + if(RDSstatus) General16Sprite.setTextColor(RDSColor, RDSColorSmooth, false); + else General16Sprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); + if(band < BAND_GAP) General16Sprite.drawString(PTYString, 0, 2); // only draw it on fm if (!screenmute) { - if (advancedRDS) PTYSprite.pushSprite(35, 107); - else PTYSprite.pushSprite(35, 161); + if (advancedRDS) General16Sprite.pushSprite(35, 107, TFT_TRANSPARENT); + else General16Sprite.pushSprite(35, 161, TFT_TRANSPARENT); } if (wifi) { @@ -433,16 +434,16 @@ void showPS() { if (radio.rds.hasLongPS && showlongps) { String stationNameLongString = String(radio.rds.stationNameLong) + " "; if (stationNameLongString != stationNameLongOld) { - PSLongWidth = PSSprite.textWidth(stationNameLongString); // Measure new width + PSLongWidth = General28Sprite.textWidth(stationNameLongString); // Measure new width stationNameLongOld = stationNameLongString; } // Handle scrolling logic for long PS - if (PSSprite.textWidth(trimTrailingSpaces(radio.rds.stationNameLong)) < 150) { + if (General28Sprite.textWidth(trimTrailingSpaces(radio.rds.stationNameLong)) < 150) { xPos2 = 0; - PSSprite.fillSprite(BackgroundColor); - PSSprite.setTextColor(RDSstatus ? RDSColor : RDSDropoutColor, RDSstatus ? RDSColorSmooth : RDSDropoutColorSmooth, false); - PSSprite.drawString(stationNameLongString, xPos2, 2); + General28Sprite.fillSprite(BackgroundColor); + General28Sprite.setTextColor(RDSstatus ? RDSColor : RDSDropoutColor, RDSstatus ? RDSColorSmooth : RDSDropoutColorSmooth, false); + General28Sprite.drawString(stationNameLongString, xPos2, 2); } else { if (millis() - pslongticker >= 5) { if (xPos2 == 0 && millis() - pslongtickerhold < 2000) { @@ -456,17 +457,17 @@ void showPS() { pslongticker = millis(); } - PSSprite.fillSprite(BackgroundColor); - PSSprite.setTextColor(RDSstatus ? RDSColor : RDSDropoutColor, RDSstatus ? RDSColorSmooth : RDSDropoutColorSmooth, false); - PSSprite.drawString(stationNameLongString, xPos2 + 8, 2); - PSSprite.drawString(stationNameLongString, xPos2 + PSLongWidth, 2); + General28Sprite.fillSprite(BackgroundColor); + General28Sprite.setTextColor(RDSstatus ? RDSColor : RDSDropoutColor, RDSstatus ? RDSColorSmooth : RDSDropoutColorSmooth, false); + General28Sprite.drawString(stationNameLongString, xPos2 + 8, 2); + General28Sprite.drawString(stationNameLongString, xPos2 + PSLongWidth, 2); } } else { xPos2 = 0; - PSSprite.fillSprite(BackgroundColor); + General28Sprite.fillSprite(BackgroundColor); for (int i = 0; i < 7; i++) { - lengths[i] = PSSprite.textWidth(radio.rds.stationName.substring(0, i + 1)); + lengths[i] = General28Sprite.textWidth(radio.rds.stationName.substring(0, i + 1)); if (i > 0 && lengths[i] <= lengths[i - 1]) lengths[i] = lengths[i - 1] + 23; } @@ -476,22 +477,22 @@ void showPS() { if (ps78errorold) ps78errorold = radio.rds.ps78error; if (!RDSstatus || band > BAND_GAP) { - PSSprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); - PSSprite.drawString(radio.rds.stationName, 0, 2); + General28Sprite.setTextColor(RDSDropoutColor, RDSDropoutColorSmooth, false); + General28Sprite.drawString(radio.rds.stationName, 0, 2); } else if ((ps12errorold || ps34errorold || ps56errorold || ps78errorold) && radio.ps_process) { for (int i = 0; i < 7; i++) { - PSSprite.setTextColor((i < 2 && ps12errorold) || (i < 4 && ps34errorold) || (i < 6 && ps56errorold) || ps78errorold ? RDSDropoutColor : RDSColor, RDSColorSmooth, false); - PSSprite.drawString(radio.rds.stationName.substring(i, i + 1), i == 0 ? 0 : lengths[i - 1], 2); + General28Sprite.setTextColor((i < 2 && ps12errorold) || (i < 4 && ps34errorold) || (i < 6 && ps56errorold) || ps78errorold ? RDSDropoutColor : RDSColor, RDSColorSmooth, false); + General28Sprite.drawString(radio.rds.stationName.substring(i, i + 1), i == 0 ? 0 : lengths[i - 1], 2); } } else { - PSSprite.setTextColor(RDSColor, RDSColorSmooth, false); - PSSprite.drawString(radio.rds.stationName, 0, 2); + General28Sprite.setTextColor(RDSColor, RDSColorSmooth, false); + General28Sprite.drawString(radio.rds.stationName, 0, 2); } if (PSold != radio.rds.stationName) ps12errorold = ps34errorold = ps56errorold = ps78errorold = true; } - if (!screenmute) PSSprite.pushSprite(36, advancedRDS ? 72 : 185); + if (!screenmute) General28Sprite.pushSprite(36, advancedRDS ? 72 : 185); if (wifi && radio.rds.stationName.length() > 0 && PSold != radio.rds.stationName) { Udp.beginPacket(remoteip, 9030); @@ -514,14 +515,15 @@ void showPS() { void showCT() { char timeStr[16]; char dateStr[9]; - time_t t = rtc.getEpoch() + (NTPupdated ? 0 : radio.rds.offset); + + time_t t = get_time(); if (NTPupdated) { t += NTPoffset * 3600; // Convert offset from hours to seconds if (autoDST && isDST(t)) t += 3600; } - auto localtm = localtime(&t); + auto localtm = gmtime(&t); if (clockampm) { // USA region: 12-hour AM/PM format int hour = localtm->tm_hour; @@ -546,27 +548,16 @@ void showCT() { else strftime(dateStr, sizeof(dateStr), "%d-%m-%y", localtm); rds_date = String(dateStr); - if (!screenmute && showclock && (rds_clock != rds_clockold || rds_date != rds_dateold || radio.rds.hasCT.changed(0))) { - - if ((radio.rds.hasCT && RDSstatus) || NTPupdated) { - rtcset = true; - tftReplace(ACENTER, rds_clockold, rds_clock, 134, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16); - tftReplace(ACENTER, rds_dateold, rds_date, 134, 15, RDSColor, RDSColorSmooth, BackgroundColor, 16); - } else { // Handle dropout scenarios - if (rtcset) { // Display dropout message if RTC was set - tftReplace(ACENTER, rds_clockold, rds_clock, 134, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); - tftReplace(ACENTER, rds_dateold, rds_date, 134, 15, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); - } else { // Clear and reprint the clock and date - tftPrint(ACENTER, rds_clockold, 134, 1, BackgroundColor, BackgroundColor, 16); - tftPrint(ACENTER, rds_clock, 134, 1, BackgroundColor, BackgroundColor, 16); - tftPrint(ACENTER, rds_dateold, 134, 15, BackgroundColor, BackgroundColor, 16); - tftPrint(ACENTER, rds_date, 134, 15, BackgroundColor, BackgroundColor, 16); - } - } + if (!screenmute && showclock && (rds_clock != rds_clockold || rds_date != rds_dateold)) { + General16Sprite.fillSprite(TFT_TRANSPARENT); + General16Sprite.fillRect(0, 0, 54, 58, BackgroundColor); + General16Sprite.setTextColor(RDSColor, RDSColorSmooth); + General16Sprite.drawString(rds_clock, 0, 0); + General16Sprite.drawString(rds_date, 0, 14); + General16Sprite.pushSprite(108, 2, TFT_TRANSPARENT); + rds_clockold = rds_clock; + rds_dateold = rds_date; } - - rds_clockold = rds_clock; - rds_dateold = rds_date; } void showRadioText() { @@ -772,18 +763,18 @@ void ShowAFEON() { if (AIDStringTemp != AIDStringold) { AIDString = String(textUI(33)) + " - " + String(textUI(79)) + ": " + AIDStringTemp + " "; - AIDWidth = FullLineSprite.textWidth(AIDString); + AIDWidth = General16Sprite.textWidth(AIDString); AIDStringold = AIDString; } } - if (FullLineSprite.textWidth(trimTrailingSpaces(AIDString)) < 270) { + if (General16Sprite.textWidth(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); + General16Sprite.fillSprite(BackgroundColor); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(AIDString, xPos, 2); + General16Sprite.drawLine(283, 0, 283, 19, FrameColor); + General16Sprite.pushSprite(5, 220); } else { if (millis() - rtticker >= 5) { if (xPos < -AIDWidth) xPos = 0; @@ -796,12 +787,12 @@ void ShowAFEON() { xPos--; rttickerhold = millis(); } - FullLineSprite.fillSprite(BackgroundColor); - FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - FullLineSprite.drawString(AIDString, xPos, 2); - FullLineSprite.drawString(AIDString, xPos + AIDWidth, 2); - FullLineSprite.drawLine(314, 0, 314, 19, FrameColor); - FullLineSprite.pushSprite(5, 220); + General16Sprite.fillSprite(BackgroundColor); + General16Sprite.setTextColor(ActiveColor, ActiveColorSmooth, false); + General16Sprite.drawString(AIDString, xPos, 2); + General16Sprite.drawString(AIDString, xPos + AIDWidth, 2); + General16Sprite.drawLine(314, 0, 314, 19, FrameColor); + General16Sprite.pushSprite(5, 220); rtticker = millis(); } } diff --git a/src/rtc.cpp b/src/rtc.cpp index a0137fa..464fc8c 100644 --- a/src/rtc.cpp +++ b/src/rtc.cpp @@ -55,4 +55,19 @@ void sync_from_rx_rtc(int32_t offset) { if(!rx_rtc_avail) return; RX8010SJ::DateTime dateTime = rx_rtc.readDateTime(); rtc.setTime(dateTimeToTime(&dateTime) + offset); +} + +time_t get_time() { + if(!rx_rtc_avail) return rtc.getEpoch(); + RX8010SJ::DateTime dateTime = rx_rtc.readDateTime(); + return dateTimeToTime(&dateTime); +} + +void set_time(time_t time) { + rtc.setTime(time); + if(rx_rtc_avail) { + RX8010SJ::DateTime rx_currenttime = RX8010SJ::DateTime(); + timeToDateTime(time, &rx_currenttime); + rx_rtc.writeDateTime(rx_currenttime); + } } \ No newline at end of file