Merge pull request #775 from MCelliotG/main

This commit is contained in:
Sjef Verhoeven PE5PVB
2025-02-07 08:21:24 +01:00
committed by GitHub
6 changed files with 268 additions and 229 deletions
+52 -72
View File
@@ -288,6 +288,8 @@ int SignificantColor;
int SignificantColorSmooth; int SignificantColorSmooth;
int StereoColor; int StereoColor;
int StereoColorSmooth; int StereoColorSmooth;
int WifiColorHigh;
int WifiColorLow;
int SquelchShow; int SquelchShow;
int rotary; int rotary;
int rotarycounter; int rotarycounter;
@@ -1004,7 +1006,7 @@ void loop() {
if (shouldScan) { if (shouldScan) {
if (scanmute && scanholdonsignal) { if (scanmute && scanholdonsignal) {
radio.setMute(); radio.setMute();
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
SQ = true; SQ = true;
} }
scanholdflag = false; scanholdflag = false;
@@ -1046,7 +1048,7 @@ void loop() {
if (scanmute && scanholdonsignal) { if (scanmute && scanholdonsignal) {
radio.setUnMute(); radio.setUnMute();
SQ = false; SQ = false;
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
} }
@@ -1102,7 +1104,7 @@ void loop() {
if (radio.af_counter == 0) { if (radio.af_counter == 0) {
if (findMemoryAF && radio.rds.correctPI != 0 && tunemode == TUNE_MEM && (USN > 250 || WAM > 250)) { if (findMemoryAF && radio.rds.correctPI != 0 && tunemode == TUNE_MEM && (USN > 250 || WAM > 250)) {
radio.setMute(); radio.setMute();
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
SQ = true; SQ = true;
if (!screenmute) { if (!screenmute) {
if (advancedRDS) { if (advancedRDS) {
@@ -1146,7 +1148,7 @@ void loop() {
radio.setUnMute(); radio.setUnMute();
SQ = false; SQ = false;
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
findMemoryAF = false; findMemoryAF = false;
} else { } else {
@@ -1272,7 +1274,7 @@ void loop() {
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
tft.drawLine(16, 143, 203, 143, GreyoutColor); tft.drawLine(16, 143, 203, 143, GreyoutColor);
tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor);
} }
LowLevelInit = false; LowLevelInit = false;
} }
@@ -2352,7 +2354,7 @@ void SelectBand() {
} }
if (band > BAND_GAP) { if (band > BAND_GAP) {
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
if (tunemode == TUNE_MI_BAND && band != BAND_SW) tunemode = TUNE_MAN; if (tunemode == TUNE_MI_BAND && band != BAND_SW) tunemode = TUNE_MAN;
BWreset = true; BWreset = true;
BWset = BWsetAM; BWset = BWsetAM;
@@ -2388,7 +2390,7 @@ void SelectBand() {
tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor);
tft.fillRoundRect(249, 57, 30, 18, 2, GreyoutColor); tft.fillRoundRect(249, 57, 30, 18, 2, GreyoutColor);
tftPrint(0, "iMS", 265, 59, BackgroundColor, GreyoutColor, 16); tftPrint(0, "iMS", 265, 59, BackgroundColor, GreyoutColor, 16);
tft.fillRoundRect(287, 57, 30, 18, 2, GreyoutColor); tft.fillRoundRect(287, 57, 30, 18, 2, GreyoutColor);
@@ -2481,7 +2483,7 @@ void BWButtonPress() {
} else { } else {
if (!usesquelch) radio.setUnMute(); if (!usesquelch) radio.setUnMute();
if (!BWtune && !menu) { if (!BWtune && !menu) {
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
unsigned long counterold = millis(); unsigned long counterold = millis();
unsigned long counter = millis(); unsigned long counter = millis();
while (digitalRead(BWBUTTON) == LOW && counter - counterold <= 1000) counter = millis(); while (digitalRead(BWBUTTON) == LOW && counter - counterold <= 1000) counter = millis();
@@ -2509,23 +2511,15 @@ void BWButtonPress() {
void doStereoToggle() { void doStereoToggle() {
if (StereoToggle) { if (StereoToggle) {
if (!screenmute) { if (!screenmute) {
tft.drawCircle(43, 15, 10, BackgroundColor); tft.drawBitmap(32, 5, Stereo, 32, 22, BackgroundColor);
tft.drawCircle(43, 15, 9, BackgroundColor); tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor);
tft.drawCircle(53, 15, 10, BackgroundColor);
tft.drawCircle(53, 15, 9, BackgroundColor);
tft.drawCircle(48, 15, 10, SecondaryColor);
tft.drawCircle(48, 15, 9, SecondaryColor);
} }
radio.setMono(true); radio.setMono(true);
StereoToggle = false; StereoToggle = false;
} else { } else {
if (!screenmute) { if (!screenmute) {
tft.drawCircle(48, 15, 10, BackgroundColor); tft.drawBitmap(38, 5, Mono, 22, 22, BackgroundColor);
tft.drawCircle(48, 15, 9, BackgroundColor); tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor);
tft.drawCircle(43, 15, 10, GreyoutColor);
tft.drawCircle(43, 15, 9, GreyoutColor);
tft.drawCircle(53, 15, 10, GreyoutColor);
tft.drawCircle(53, 15, 9, GreyoutColor);
} }
radio.setMono(false); radio.setMono(false);
Stereostatusold = false; Stereostatusold = false;
@@ -2555,7 +2549,7 @@ void ModeButtonPress() {
} else { } else {
if (!BWtune && !menu) { if (!BWtune && !menu) {
if (!screenmute && !afscreen) { if (!screenmute && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
memorystore = false; memorystore = false;
unsigned long counterold = millis(); unsigned long counterold = millis();
@@ -2763,7 +2757,7 @@ void ButtonPress() {
} }
} }
} else { } else {
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
unsigned long counterold = millis(); unsigned long counterold = millis();
unsigned long counter = millis(); unsigned long counter = millis();
while (digitalRead(ROTARY_BUTTON) == LOW && counter - counterold <= 1000) counter = millis(); while (digitalRead(ROTARY_BUTTON) == LOW && counter - counterold <= 1000) counter = millis();
@@ -3104,20 +3098,12 @@ void DoMemoryPosTune() {
StereoToggle = presets[memorypos].ms; StereoToggle = presets[memorypos].ms;
if (!StereoToggle) { if (!StereoToggle) {
Stereostatusold = false; Stereostatusold = false;
tft.drawCircle(43, 15, 10, BackgroundColor); tft.drawBitmap(32, 5, Stereo, 32, 22, BackgroundColor);
tft.drawCircle(43, 15, 9, BackgroundColor); tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor);
tft.drawCircle(53, 15, 10, BackgroundColor);
tft.drawCircle(53, 15, 9, BackgroundColor);
tft.drawCircle(48, 15, 10, SecondaryColor);
tft.drawCircle(48, 15, 9, SecondaryColor);
} else { } else {
Stereostatusold = false; Stereostatusold = false;
tft.drawCircle(48, 15, 10, BackgroundColor); tft.drawBitmap(38, 5, Mono, 22, 22, BackgroundColor);
tft.drawCircle(48, 15, 9, BackgroundColor); tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor);
tft.drawCircle(43, 15, 10, GreyoutColor);
tft.drawCircle(43, 15, 9, GreyoutColor);
tft.drawCircle(53, 15, 10, GreyoutColor);
tft.drawCircle(53, 15, 9, GreyoutColor);
} }
} }
@@ -3423,9 +3409,9 @@ void ShowRDSLogo(bool RDSstatus) {
if (!screenmute) { if (!screenmute) {
if (RDSstatus != RDSstatusold) { if (RDSstatus != RDSstatusold) {
if (RDSstatus) { if (RDSstatus) {
tft.drawBitmap(70, 5, RDSLogo, 35, 22, RDSColor); tft.drawBitmap(68, 5, RDSLogo, 35, 22, RDSColor);
} else { } else {
tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor);
} }
} }
RDSstatusold = RDSstatus; RDSstatusold = RDSstatus;
@@ -3437,16 +3423,10 @@ void ShowStereoStatus() {
if (band < BAND_GAP) Stereostatus = radio.getStereoStatus(); else Stereostatus = false; if (band < BAND_GAP) Stereostatus = radio.getStereoStatus(); else Stereostatus = false;
if (Stereostatus != Stereostatusold) { if (Stereostatus != Stereostatusold) {
if (Stereostatus && !screenmute) { if (Stereostatus && !screenmute) {
tft.drawCircle(43, 15, 10, StereoColor); tft.drawBitmap(32, 5, Stereo, 32, 22, StereoColor);
tft.drawCircle(43, 15, 9, StereoColor);
tft.drawCircle(53, 15, 10, StereoColor);
tft.drawCircle(53, 15, 9, StereoColor);
} else { } else {
if (!screenmute) { if (!screenmute) {
tft.drawCircle(43, 15, 10, GreyoutColor); tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor);
tft.drawCircle(43, 15, 9, GreyoutColor);
tft.drawCircle(53, 15, 10, GreyoutColor);
tft.drawCircle(53, 15, 9, GreyoutColor);
} }
} }
Stereostatusold = Stereostatus; Stereostatusold = Stereostatus;
@@ -3550,7 +3530,7 @@ void ShowBW() {
} }
if (BW != BWOld || BWreset) { if (BW != BWOld || BWreset) {
if (BWset == 0) tftReplace(1, String (BWOld, DEC), String (BW, DEC), 201, 4, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 28); else tftReplace(1, String (BWOld, DEC), String (BW, DEC), 201, 4, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 28); if (BWset == 0) tftReplace(1, String (BWOld, DEC), String (BW, DEC), 203, 4, BWAutoColor, BWAutoColorSmooth, BackgroundColor, 28); else tftReplace(1, String (BWOld, DEC), String (BW, DEC), 203, 4, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 28);
BWOld = BW; BWOld = BW;
BWreset = false; BWreset = false;
if (wifi) { if (wifi) {
@@ -3675,7 +3655,7 @@ void doSquelch() {
if (SQ || BWreset) { if (SQ || BWreset) {
if (!seek) radio.setUnMute(); if (!seek) radio.setUnMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
autosquelchtimer = millis(); autosquelchtimer = millis();
SQ = false; SQ = false;
@@ -3684,7 +3664,7 @@ void doSquelch() {
if ((!SQ || BWreset) && (millis() >= autosquelchtimer + 1000)) { if ((!SQ || BWreset) && (millis() >= autosquelchtimer + 1000)) {
radio.setMute(); radio.setMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
autosquelchtimer = millis(); autosquelchtimer = millis();
SQ = true; SQ = true;
@@ -3694,13 +3674,13 @@ void doSquelch() {
if ((USN < amscansens * 30) && (OStatus < 2 && OStatus > -2) && (!scandxmode || (scandxmode && !scanmute))) { if ((USN < amscansens * 30) && (OStatus < 2 && OStatus > -2) && (!scandxmode || (scandxmode && !scanmute))) {
if (!seek) radio.setUnMute(); if (!seek) radio.setUnMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
SQ = false; SQ = false;
} else { } else {
radio.setMute(); radio.setMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
SQ = true; SQ = true;
} }
@@ -3734,13 +3714,13 @@ void doSquelch() {
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) { if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
if (!seek) radio.setUnMute(); if (!seek) radio.setUnMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
SQ = false; SQ = false;
} else { } else {
radio.setMute(); radio.setMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
SQ = true; SQ = true;
} }
@@ -3748,13 +3728,13 @@ void doSquelch() {
if (Stereostatus) { if (Stereostatus) {
radio.setUnMute(); radio.setUnMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
SQ = false; SQ = false;
} else { } else {
radio.setMute(); radio.setMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
SQ = true; SQ = true;
} }
@@ -3783,13 +3763,13 @@ void doSquelch() {
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) { if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
if (!seek) radio.setUnMute(); if (!seek) radio.setUnMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
SQ = false; SQ = false;
} else { } else {
radio.setMute(); radio.setMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
SQ = true; SQ = true;
} }
@@ -3797,13 +3777,13 @@ void doSquelch() {
if (Stereostatus) { if (Stereostatus) {
if (!seek) radio.setUnMute(); if (!seek) radio.setUnMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
SQ = false; SQ = false;
} else { } else {
radio.setMute(); radio.setMute();
if (!screenmute && !seek && !afscreen) { if (!screenmute && !seek && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
SQ = true; SQ = true;
} }
@@ -4110,18 +4090,18 @@ void ShowRSSI() {
if (rssiold != rssi) { if (rssiold != rssi) {
rssiold = rssi; rssiold = rssi;
if (rssi == 0) { if (rssi == 0) {
tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor);
} else if (rssi > -50 && rssi < 0) { } else if (rssi > -50 && rssi < 0) {
tft.drawBitmap(250, 4, WiFi4, 25, 25, PrimaryColor); tft.drawBitmap(250, 4, WiFi4, 25, 23, WifiColorHigh);
} else if (rssi > -60) { } else if (rssi > -60) {
tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor);
tft.drawBitmap(250, 4, WiFi3, 25, 25, PrimaryColor); tft.drawBitmap(250, 4, WiFi3, 25, 23, WifiColorHigh);
} else if (rssi > -70) { } else if (rssi > -70) {
tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor);
tft.drawBitmap(250, 4, WiFi2, 25, 25, PrimaryColor); tft.drawBitmap(250, 4, WiFi2, 25, 23, WifiColorLow);
} else if (rssi < -70) { } else if (rssi < -70) {
tft.drawBitmap(250, 4, WiFi4, 25, 25, GreyoutColor); tft.drawBitmap(250, 4, WiFi4, 25, 23, GreyoutColor);
tft.drawBitmap(250, 4, WiFi1, 25, 25, PrimaryColor); tft.drawBitmap(250, 4, WiFi1, 25, 23, WifiColorLow);
} }
} }
} }
@@ -4406,12 +4386,12 @@ void EdgeBeeper() {
if (radio.mute) { if (radio.mute) {
radio.setMute(); radio.setMute();
if (!screenmute && !afscreen) { if (!screenmute && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
} else { } else {
radio.setUnMute(); radio.setUnMute();
if (!screenmute && !afscreen) { if (!screenmute && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
} }
} }
@@ -4428,7 +4408,7 @@ void Seek(bool mode) {
} }
if (!screenmute && !afscreen) { if (!screenmute && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
} }
if (!mode) TuneDown(); else TuneUp(); if (!mode) TuneDown(); else TuneUp();
delay(50); delay(50);
@@ -4444,7 +4424,7 @@ void Seek(bool mode) {
seek = false; seek = false;
radio.setUnMute(); radio.setUnMute();
if (!screenmute && !afscreen) { if (!screenmute && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
store = true; store = true;
} else { } else {
@@ -4458,7 +4438,7 @@ void Seek(bool mode) {
seek = false; seek = false;
radio.setUnMute(); radio.setUnMute();
if (!screenmute && !afscreen) { if (!screenmute && !afscreen) {
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
} }
store = true; store = true;
} else { } else {
@@ -4832,7 +4812,7 @@ void cancelDXScan() {
scandxmode = false; scandxmode = false;
if (scanmute) { if (scanmute) {
radio.setUnMute(); radio.setUnMute();
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
if (!flashing) { if (!flashing) {
tft.fillRoundRect(2, 80, 40, 18, 2, SecondaryColor); tft.fillRoundRect(2, 80, 40, 18, 2, SecondaryColor);
@@ -4997,7 +4977,7 @@ void startFMDXScan() {
} }
if (scanmute) { if (scanmute) {
radio.setMute(); radio.setMute();
tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
SQ = true; SQ = true;
Squelchold = -2; Squelchold = -2;
} }
+5 -5
View File
@@ -732,7 +732,7 @@ void XDRGTKRoutine() {
case '\0': case '\0':
radio.setMute(); radio.setMute();
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
if (!screenmute) { if (!screenmute) {
tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor); tft.drawRoundRect(10, 30, 300, 170, 5, ActiveColor);
tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor); tft.fillRoundRect(12, 32, 296, 166, 5, BackgroundColor);
@@ -761,7 +761,7 @@ void XDRGTKRoutine() {
XDRScan = false; XDRScan = false;
if (VolSet != 0) { if (VolSet != 0) {
radio.setUnMute(); radio.setUnMute();
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
radio.setVolume(((VolSet * 10) - 40) / 10); radio.setVolume(((VolSet * 10) - 40) / 10);
} }
break; break;
@@ -799,12 +799,12 @@ void XDRGTKRoutine() {
VolSet = atoi(buff + 1); VolSet = atoi(buff + 1);
if (VolSet == 0) { if (VolSet == 0) {
radio.setMute(); radio.setMute();
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, PrimaryColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, PrimaryColor);
XDRMute = true; XDRMute = true;
SQ = true; SQ = true;
} else { } else {
radio.setUnMute(); radio.setUnMute();
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
radio.setVolume((VolSet - 40) / 10); radio.setVolume((VolSet - 40) / 10);
XDRMute = false; XDRMute = false;
} }
@@ -831,7 +831,7 @@ void XDRGTKRoutine() {
store = true; store = true;
XDRMute = false; XDRMute = false;
radio.setUnMute(); radio.setUnMute();
if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 45: 140), Speaker, 21, 20, GreyoutColor); if (!screenmute && !afscreen) tft.drawBitmap((advancedRDS ? 215 : 253), (advancedRDS ? 47: 142), Speaker, 21, 20, GreyoutColor);
VolSet = EEPROM.readByte(EE_BYTE_VOLSET); VolSet = EEPROM.readByte(EE_BYTE_VOLSET);
LowLevelSet = EEPROM.readByte(EE_BYTE_LOWLEVELSET); LowLevelSet = EEPROM.readByte(EE_BYTE_LOWLEVELSET);
softmuteam = EEPROM.readByte(EE_BYTE_SOFTMUTEAM); softmuteam = EEPROM.readByte(EE_BYTE_SOFTMUTEAM);
+108 -66
View File
@@ -515,32 +515,80 @@ static const uint8_t Speaker[] PROGMEM = {
0x00, 0x00, 0x00 0x00, 0x00, 0x00
}; };
static const uint8_t Mono[] PROGMEM = {
0x00, 0x78, 0x00,
0x03, 0xff, 0x00,
0x0f, 0xff, 0xc0,
0x1f, 0x03, 0xe0,
0x3c, 0x00, 0xf0,
0x38, 0x00, 0x70,
0x70, 0x00, 0x38,
0x70, 0x00, 0x38,
0x60, 0x00, 0x18,
0xe0, 0x00, 0x1c,
0xe0, 0x00, 0x1c,
0xe0, 0x00, 0x1c,
0xe0, 0x00, 0x1c,
0x60, 0x00, 0x18,
0x70, 0x00, 0x38,
0x70, 0x00, 0x38,
0x38, 0x00, 0x70,
0x3c, 0x00, 0xf0,
0x1f, 0x03, 0xe0,
0x0f, 0xff, 0xc0,
0x03, 0xff, 0x00,
0x00, 0x78, 0x00
};
static const uint8_t Stereo[] PROGMEM = {
0x00, 0x78, 0x1e, 0x00,
0x03, 0xfc, 0xff, 0xc0,
0x0f, 0xf1, 0xff, 0xf0,
0x1f, 0x07, 0xc0, 0xf8,
0x3c, 0x07, 0x80, 0x3c,
0x38, 0x0e, 0x00, 0x1c,
0x70, 0x1e, 0x00, 0x0e,
0x70, 0x1c, 0x00, 0x0e,
0xe0, 0x1c, 0x00, 0x07,
0xe0, 0x38, 0x00, 0x07,
0xe0, 0x38, 0x00, 0x07,
0xe0, 0x38, 0x00, 0x07,
0xe0, 0x38, 0x00, 0x07,
0xe0, 0x1c, 0x00, 0x07,
0x70, 0x1c, 0x00, 0x0e,
0x70, 0x1e, 0x00, 0x0e,
0x38, 0x0e, 0x00, 0x1c,
0x3c, 0x07, 0x00, 0x3c,
0x1f, 0x07, 0xc0, 0xf8,
0x0f, 0xf1, 0xff, 0xf0,
0x03, 0xfc, 0xff, 0xc0,
0x00, 0x78, 0x1e, 0x00
};
static const uint8_t WiFi1[] PROGMEM = { static const uint8_t WiFi1[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
}; };
static const uint8_t WiFi2[] PROGMEM = { static const uint8_t WiFi2[] PROGMEM = {
@@ -556,18 +604,16 @@ static const uint8_t WiFi2[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00,
0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00,
0x00, 0x41, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00,
0x00, 0xff, 0x80, 0x00,
0x00, 0x7f, 0x00, 0x00,
0x00, 0x3e, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
@@ -578,52 +624,48 @@ static const uint8_t WiFi3[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x01, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xc0, 0x00,
0x03, 0xff, 0xe0, 0x00, 0x03, 0xff, 0xe0, 0x00,
0x07, 0x80, 0xf0, 0x00, 0x07, 0xff, 0xf0, 0x00,
0x0e, 0x00, 0x38, 0x00, 0x0f, 0xff, 0xf8, 0x00,
0x04, 0x00, 0x10, 0x00, 0x0f, 0xff, 0xfc, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00,
0x00, 0x7f, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00,
0x01, 0xff, 0xc0, 0x00,
0x00, 0xff, 0xc0, 0x00,
0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00,
0x00, 0x41, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
static const uint8_t WiFi4[] PROGMEM = { static const uint8_t WiFi4[] PROGMEM = {
0x00, 0x3e, 0x00, 0x00,
0x01, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xc0, 0x00,
0x07, 0xff, 0xf0, 0x00, 0x07, 0xff, 0xf0, 0x00,
0x1f, 0xc1, 0xfc, 0x00, 0x0f, 0xff, 0xf8, 0x00,
0x3e, 0x00, 0x3e, 0x00, 0x1f, 0xff, 0xfc, 0x00,
0x78, 0x00, 0x0f, 0x00, 0x3f, 0xff, 0xfe, 0x00,
0x70, 0x00, 0x07, 0x00, 0x7f, 0xff, 0xff, 0x00,
0x60, 0x00, 0x03, 0x00, 0x7f, 0xff, 0xff, 0x80,
0x00, 0x7f, 0x00, 0x00, 0x7f, 0xff, 0xff, 0x00,
0x01, 0xff, 0xc0, 0x00, 0x3f, 0xff, 0xfe, 0x00,
0x1f, 0xff, 0xfc, 0x00,
0x0f, 0xff, 0xfc, 0x00,
0x0f, 0xff, 0xf8, 0x00,
0x07, 0xff, 0xf0, 0x00,
0x03, 0xff, 0xe0, 0x00, 0x03, 0xff, 0xe0, 0x00,
0x07, 0x80, 0xf0, 0x00, 0x01, 0xff, 0xc0, 0x00,
0x0e, 0x00, 0x38, 0x00, 0x00, 0xff, 0xc0, 0x00,
0x04, 0x00, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00,
0x00, 0x7f, 0x00, 0x00,
0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00,
0x00, 0x41, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
+92 -77
View File
@@ -36,12 +36,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSDropoutColorSmooth = TealSmooth; RDSDropoutColorSmooth = TealSmooth;
BarSignificantColor = Red; BarSignificantColor = Red;
BarInsignificantColor = Green; BarInsignificantColor = Green;
ModBarSignificantColor = Red; ModBarSignificantColor = Green;
ModBarInsignificantColor = Green; ModBarInsignificantColor = Red;
BWAutoColor = Teal; BWAutoColor = Teal;
BWAutoColorSmooth = TealSmooth; BWAutoColorSmooth = TealSmooth;
BatteryValueColor = Teal; BatteryValueColor = Teal;
BatteryValueColorSmooth = Black; BatteryValueColorSmooth = Black;
WifiColorLow = Red;
WifiColorHigh = Green;
break; break;
case 1: // Cyan theme case 1: // Cyan theme
PrimaryColor = Cyan; PrimaryColor = Cyan;
@@ -65,14 +67,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = CyanSmooth; RDSColorSmooth = CyanSmooth;
RDSDropoutColor = CyanDark; RDSDropoutColor = CyanDark;
RDSDropoutColorSmooth = CyanDarkSmooth; RDSDropoutColorSmooth = CyanDarkSmooth;
BarSignificantColor = Red; BarSignificantColor = Purple;
BarInsignificantColor = Cyan; BarInsignificantColor = Cyan;
ModBarSignificantColor = Red; ModBarSignificantColor = Cyan;
ModBarInsignificantColor = Cyan; ModBarInsignificantColor = Blue;
BWAutoColor = Teal; BWAutoColor = Teal;
BWAutoColorSmooth = TealSmooth; BWAutoColorSmooth = TealSmooth;
BatteryValueColor = Teal; BatteryValueColor = Teal;
BatteryValueColorSmooth = TealSmooth; BatteryValueColorSmooth = TealSmooth;
WifiColorLow = Skyblue;
WifiColorHigh = Cyan;
break; break;
case 2: // Crimson theme case 2: // Crimson theme
PrimaryColor = Crimson; PrimaryColor = Crimson;
@@ -98,12 +102,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSDropoutColorSmooth = CrimsonDarkSmooth; RDSDropoutColorSmooth = CrimsonDarkSmooth;
BarSignificantColor = Yellow; BarSignificantColor = Yellow;
BarInsignificantColor = Crimson; BarInsignificantColor = Crimson;
ModBarSignificantColor = Yellow; ModBarSignificantColor = Watermelon;
ModBarInsignificantColor = Crimson; ModBarInsignificantColor = Yellow;
BWAutoColor = Coral; BWAutoColor = Coral;
BWAutoColorSmooth = CoralSmooth; BWAutoColorSmooth = CoralSmooth;
BatteryValueColor = Watermelon; BatteryValueColor = Watermelon;
BatteryValueColorSmooth = WatermelonSmooth; BatteryValueColorSmooth = WatermelonSmooth;
WifiColorLow = Yellow;
WifiColorHigh = Crimson;
break; break;
case 3: // Monochrome theme case 3: // Monochrome theme
PrimaryColor = White; PrimaryColor = White;
@@ -127,14 +133,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = Black; RDSColorSmooth = Black;
RDSDropoutColor = PaleGrey; RDSDropoutColor = PaleGrey;
RDSDropoutColorSmooth = Black; RDSDropoutColorSmooth = Black;
BarSignificantColor = Red; BarSignificantColor = Honeydew;
BarInsignificantColor = Green; BarInsignificantColor = White;
ModBarSignificantColor = Red; ModBarSignificantColor = White;
ModBarInsignificantColor = Green; ModBarInsignificantColor = Honeydew;
BWAutoColor = PureGrey; BWAutoColor = PureGrey;
BWAutoColorSmooth = Black; BWAutoColorSmooth = Black;
BatteryValueColor = White; BatteryValueColor = White;
BatteryValueColorSmooth = Black; BatteryValueColorSmooth = Black;
WifiColorLow = Honeydew;
WifiColorHigh = White;
break; break;
case 4: // Volcano theme case 4: // Volcano theme
PrimaryColor = Orange; PrimaryColor = Orange;
@@ -160,12 +168,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSDropoutColorSmooth = DallasSmooth; RDSDropoutColorSmooth = DallasSmooth;
BarSignificantColor = Red; BarSignificantColor = Red;
BarInsignificantColor = Orange; BarInsignificantColor = Orange;
ModBarSignificantColor = Red; ModBarSignificantColor = Orange;
ModBarInsignificantColor = Orange; ModBarInsignificantColor = Cherry;
BWAutoColor = Tangerine; BWAutoColor = Tangerine;
BWAutoColorSmooth = TangerineSmooth; BWAutoColorSmooth = TangerineSmooth;
BatteryValueColor = Tangerine; BatteryValueColor = Tangerine;
BatteryValueColorSmooth = TangerineSmooth; BatteryValueColorSmooth = TangerineSmooth;
WifiColorLow = Orange;
WifiColorHigh = Red;
break; break;
case 5: // Dendro theme case 5: // Dendro theme
PrimaryColor = Green; PrimaryColor = Green;
@@ -189,14 +199,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = GreenDark; RDSColorSmooth = GreenDark;
RDSDropoutColor = Laurel; RDSDropoutColor = Laurel;
RDSDropoutColorSmooth = LaurelSmooth; RDSDropoutColorSmooth = LaurelSmooth;
BarSignificantColor = Red; BarSignificantColor = Cabbage;
BarInsignificantColor = Green; BarInsignificantColor = Green;
ModBarSignificantColor = Red; ModBarSignificantColor = Green;
ModBarInsignificantColor = Green; ModBarInsignificantColor = Teal;
BWAutoColor = Cabbage; BWAutoColor = Cabbage;
BWAutoColorSmooth = CabbageSmooth; BWAutoColorSmooth = CabbageSmooth;
BatteryValueColor = Cabbage; BatteryValueColor = Cabbage;
BatteryValueColorSmooth = CabbageSmooth; BatteryValueColorSmooth = CabbageSmooth;
WifiColorLow = Green;
WifiColorHigh = Turquoise;
break; break;
case 6: // Sakura theme case 6: // Sakura theme
PrimaryColor = Sakura; PrimaryColor = Sakura;
@@ -220,15 +232,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = SakuraSmooth; RDSColorSmooth = SakuraSmooth;
RDSDropoutColor = SakuraGrey; RDSDropoutColor = SakuraGrey;
RDSDropoutColorSmooth = SakuraGreySmooth; RDSDropoutColorSmooth = SakuraGreySmooth;
BarSignificantColor = Black; BarSignificantColor = Violet;
BarSignificantColor = Red;
BarInsignificantColor = Sakura; BarInsignificantColor = Sakura;
ModBarSignificantColor = Red; ModBarSignificantColor = Sakura;
ModBarInsignificantColor = Sakura; ModBarInsignificantColor = Pink;
BWAutoColor = Cherry; BWAutoColor = Cherry;
BWAutoColorSmooth = CherrySmooth; BWAutoColorSmooth = CherrySmooth;
BatteryValueColor = Cherry; BatteryValueColor = Cherry;
BatteryValueColorSmooth = CherrySmooth; BatteryValueColorSmooth = CherrySmooth;
WifiColorLow = Violet;
WifiColorHigh = Sakura;
break; break;
case 7: // Whiteout theme case 7: // Whiteout theme
PrimaryColor = Black; PrimaryColor = Black;
@@ -252,14 +265,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = Honeydew; RDSColorSmooth = Honeydew;
RDSDropoutColor = PureGrey; RDSDropoutColor = PureGrey;
RDSDropoutColorSmooth = White; RDSDropoutColorSmooth = White;
BarSignificantColor = Black; BarSignificantColor = PureGrey;
BarInsignificantColor = Green; BarInsignificantColor = Black;
ModBarSignificantColor = Black; ModBarSignificantColor = Black;
ModBarInsignificantColor = Green; ModBarInsignificantColor = PureGrey;
BWAutoColor = PureGrey; BWAutoColor = PureGrey;
BWAutoColorSmooth = White; BWAutoColorSmooth = White;
BatteryValueColor = Black; BatteryValueColor = Black;
BatteryValueColorSmooth = White; BatteryValueColorSmooth = White;
WifiColorLow = Black;
WifiColorHigh = Darkgrey;
break; break;
case 8: // Tangerine theme case 8: // Tangerine theme
PrimaryColor = Tangerine; PrimaryColor = Tangerine;
@@ -283,14 +298,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = IndigoSmooth; RDSColorSmooth = IndigoSmooth;
RDSDropoutColor = Copper; RDSDropoutColor = Copper;
RDSDropoutColorSmooth = CopperSmooth; RDSDropoutColorSmooth = CopperSmooth;
BarSignificantColor = Red; BarSignificantColor = Tangerine;
BarInsignificantColor = Green; BarInsignificantColor = Yellow;
ModBarSignificantColor = Red; ModBarSignificantColor = Yellow;
ModBarInsignificantColor = Green; ModBarInsignificantColor = Orange;
BWAutoColor = Yolk; BWAutoColor = Yolk;
BWAutoColorSmooth = YolkSmooth; BWAutoColorSmooth = YolkSmooth;
BatteryValueColor = Yolk; BatteryValueColor = Yolk;
BatteryValueColorSmooth = YolkSmooth; BatteryValueColorSmooth = YolkSmooth;
WifiColorLow = Yellow;
WifiColorHigh = Orange;
break; break;
case 9: // Ocean theme case 9: // Ocean theme
PrimaryColor = Ocean; PrimaryColor = Ocean;
@@ -314,14 +331,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = OceanSmooth; RDSColorSmooth = OceanSmooth;
RDSDropoutColor = Cove; RDSDropoutColor = Cove;
RDSDropoutColorSmooth = CoveSmooth; RDSDropoutColorSmooth = CoveSmooth;
BarSignificantColor = Red; BarSignificantColor = Skyblue;
BarInsignificantColor = Ocean; BarInsignificantColor = Ocean;
ModBarSignificantColor = Red; ModBarSignificantColor = Ocean;
ModBarInsignificantColor = Ocean; ModBarInsignificantColor = Deepsky;
BWAutoColor = Deepsky; BWAutoColor = Deepsky;
BWAutoColorSmooth = DeepskySmooth; BWAutoColorSmooth = DeepskySmooth;
BatteryValueColor = Deepsky; BatteryValueColor = Deepsky;
BatteryValueColorSmooth = DeepskySmooth; BatteryValueColorSmooth = DeepskySmooth;
WifiColorLow = Ocean;
WifiColorHigh = Skyblue;
break; break;
case 10: // Indigo theme case 10: // Indigo theme
PrimaryColor = Indigo; PrimaryColor = Indigo;
@@ -345,14 +364,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = IndigoSmooth; RDSColorSmooth = IndigoSmooth;
RDSDropoutColor = Logan; RDSDropoutColor = Logan;
RDSDropoutColorSmooth = LoganSmooth; RDSDropoutColorSmooth = LoganSmooth;
BarSignificantColor = Red; BarSignificantColor = Cherry;
BarInsignificantColor = Indigo; BarInsignificantColor = Indigo;
ModBarSignificantColor = Red; ModBarSignificantColor = Indigo;
ModBarInsignificantColor = Indigo; ModBarInsignificantColor = Purple;
BWAutoColor = Violet; BWAutoColor = Violet;
BWAutoColorSmooth = VioletSmooth; BWAutoColorSmooth = VioletSmooth;
BatteryValueColor = Violet; BatteryValueColor = Violet;
BatteryValueColorSmooth = VioletSmooth; BatteryValueColorSmooth = VioletSmooth;
WifiColorLow = Violet;
WifiColorHigh = Purple;
break; break;
case 11: // Maroon case 11: // Maroon
@@ -379,12 +400,14 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSDropoutColorSmooth = LoganSmooth; RDSDropoutColorSmooth = LoganSmooth;
BarSignificantColor = Yolk; BarSignificantColor = Yolk;
BarInsignificantColor = Cherry; BarInsignificantColor = Cherry;
ModBarSignificantColor = Yolk; ModBarSignificantColor = Cherry;
ModBarInsignificantColor = Cherry; ModBarInsignificantColor = Violet;
BWAutoColor = Violet; BWAutoColor = Violet;
BWAutoColorSmooth = VioletSmooth; BWAutoColorSmooth = VioletSmooth;
BatteryValueColor = Purple; BatteryValueColor = Purple;
BatteryValueColorSmooth = PurpleSmooth; BatteryValueColorSmooth = PurpleSmooth;
WifiColorLow = Yolk;
WifiColorHigh = Cherry;
break; break;
case 12: // GoldBrite case 12: // GoldBrite
@@ -409,14 +432,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = YellowSmooth; RDSColorSmooth = YellowSmooth;
RDSDropoutColor = Teal; RDSDropoutColor = Teal;
RDSDropoutColorSmooth = TealSmooth; RDSDropoutColorSmooth = TealSmooth;
BarSignificantColor = Red; BarSignificantColor = Ocean;
BarInsignificantColor = Ocean; BarInsignificantColor = Cherry;
ModBarSignificantColor = Red; ModBarSignificantColor = Green;
ModBarInsignificantColor = Green; ModBarInsignificantColor = Blue;
BWAutoColor = Teal; BWAutoColor = Teal;
BWAutoColorSmooth = TealSmooth; BWAutoColorSmooth = TealSmooth;
BatteryValueColor = Teal; BatteryValueColor = Teal;
BatteryValueColorSmooth = Black; BatteryValueColorSmooth = Black;
WifiColorLow = Ocean;
WifiColorHigh = Cherry;
break; break;
case 13: // Bubblegum case 13: // Bubblegum
@@ -441,14 +466,16 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
RDSColorSmooth = TealSmooth; RDSColorSmooth = TealSmooth;
RDSDropoutColor = Logan; RDSDropoutColor = Logan;
RDSDropoutColorSmooth = LoganSmooth; RDSDropoutColorSmooth = LoganSmooth;
BarSignificantColor = Coral; BarSignificantColor = Violet;
BarInsignificantColor = Teal; BarInsignificantColor = Teal;
ModBarSignificantColor = Sakura; ModBarSignificantColor = Teal;
ModBarInsignificantColor = Skyblue; ModBarInsignificantColor = Pink;
BWAutoColor = Violet; BWAutoColor = Violet;
BWAutoColorSmooth = VioletSmooth; BWAutoColorSmooth = VioletSmooth;
BatteryValueColor = Turquoise; BatteryValueColor = Turquoise;
BatteryValueColorSmooth = CyanDarkSmooth; BatteryValueColorSmooth = CyanDarkSmooth;
WifiColorLow = Violet;
WifiColorHigh = Turquoise;
break; break;
} }
} }
@@ -466,16 +493,14 @@ void BuildAFScreen() {
tft.fillScreen(BackgroundColor); tft.fillScreen(BackgroundColor);
tft.drawRect(0, 0, 320, 240, FrameColor); tft.drawRect(0, 0, 320, 240, FrameColor);
tft.drawLine(0, 30, 320, 30, FrameColor); tft.drawLine(0, 30, 320, 30, FrameColor);
tft.drawLine(0, 15, 13, 15, FrameColor);
tft.drawLine(0, 199, 320, 199, FrameColor); tft.drawLine(0, 199, 320, 199, FrameColor);
tft.drawLine(0, 218, 320, 218, FrameColor); tft.drawLine(0, 218, 320, 218, FrameColor);
tft.drawLine(30, 30, 30, 0, FrameColor); tft.drawLine(30, 30, 30, 0, FrameColor);
tft.drawLine(67, 30, 67, 0, FrameColor); tft.drawLine(66, 30, 66, 0, FrameColor);
tft.drawLine(107, 30, 107, 0, FrameColor); tft.drawLine(105, 30, 105, 0, FrameColor);
tft.drawLine(107, 15, 160, 15, FrameColor); tft.drawLine(162, 30, 162, 0, FrameColor);
tft.drawLine(160, 30, 160, 0, FrameColor);
tft.drawLine(248, 30, 248, 0, FrameColor); tft.drawLine(248, 30, 248, 0, FrameColor);
tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28); tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
tftPrint(0, myLanguage[language][33], 160, 222, ActiveColor, ActiveColorSmooth, 16); tftPrint(0, myLanguage[language][33], 160, 222, ActiveColor, ActiveColorSmooth, 16);
if (afpagenr == 1) { if (afpagenr == 1) {
if (!radio.rds.hasAF) tftPrint(-1, myLanguage[language][87], 6, 48, PrimaryColor, PrimaryColorSmooth, 16); if (!radio.rds.hasAF) tftPrint(-1, myLanguage[language][87], 6, 48, PrimaryColor, PrimaryColorSmooth, 16);
@@ -1394,7 +1419,7 @@ void ShowOneLine(byte position, byte item, bool selected) {
FullLineSprite.setTextDatum(TR_DATUM); FullLineSprite.setTextDatum(TR_DATUM);
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
FullLineSprite.drawString("kHz", 298, 2); FullLineSprite.drawString("kHz", 300, 2);
FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
switch (fmdefaultstepsize) { switch (fmdefaultstepsize) {
@@ -1413,7 +1438,7 @@ void ShowOneLine(byte position, byte item, bool selected) {
FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); FullLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
FullLineSprite.drawString((mwstepsize ? "10" : "9"), 258, 2); FullLineSprite.drawString((mwstepsize ? "10" : "9"), 258, 2);
FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); FullLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false);
FullLineSprite.drawString("kHz", 298, 2); FullLineSprite.drawString("kHz", 300, 2);
break; break;
case CONNECTIVITY: case CONNECTIVITY:
@@ -2827,15 +2852,14 @@ void BuildAdvancedRDS() {
tft.drawRect(0, 0, 320, 240, FrameColor); tft.drawRect(0, 0, 320, 240, FrameColor);
tft.drawLine(0, 30, 320, 30, FrameColor); tft.drawLine(0, 30, 320, 30, FrameColor);
tft.drawLine(0, 68, 320, 68, FrameColor); tft.drawLine(0, 68, 320, 68, FrameColor);
tft.drawLine(107, 15, 160, 15, FrameColor);
tft.drawLine(0, 104, 320, 104, FrameColor); tft.drawLine(0, 104, 320, 104, FrameColor);
tft.drawLine(0, 126, 320, 126, FrameColor); tft.drawLine(0, 126, 320, 126, FrameColor);
tft.drawLine(107, 30, 107, 0, FrameColor); tft.drawLine(105, 30, 105, 0, FrameColor);
tft.drawLine(210, 30, 210, 240, FrameColor); tft.drawLine(210, 30, 210, 240, FrameColor);
tft.drawLine(30, 30, 30, 0, FrameColor); tft.drawLine(30, 30, 30, 0, FrameColor);
tft.drawLine(67, 30, 67, 0, FrameColor); tft.drawLine(66, 30, 66, 0, FrameColor);
tft.drawLine(107, 30, 107, 0, FrameColor); tft.drawLine(105, 30, 105, 0, FrameColor);
tft.drawLine(160, 30, 160, 0, FrameColor); tft.drawLine(162, 30, 162, 0, FrameColor);
tft.drawLine(248, 30, 248, 0, FrameColor); tft.drawLine(248, 30, 248, 0, FrameColor);
tft.drawLine(0, 140, 210, 140, FrameColor); tft.drawLine(0, 140, 210, 140, FrameColor);
tft.drawLine(0, 166, 210, 166, FrameColor); tft.drawLine(0, 166, 210, 166, FrameColor);
@@ -2883,19 +2907,15 @@ void BuildAdvancedRDS() {
for (int i = 0; i < 33; i++) tft.fillCircle((6 * i) + 10, 133, 2, GreyoutColor); for (int i = 0; i < 33; i++) tft.fillCircle((6 * i) + 10, 133, 2, GreyoutColor);
tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28); tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor);
tft.drawBitmap(215, 45, Speaker, 21, 20, GreyoutColor); tft.drawBitmap(215, 47, Speaker, 21, 20, GreyoutColor);
if (!StereoToggle) { if (!StereoToggle) {
tft.drawCircle(48, 15, 10, SecondaryColor); tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor);
tft.drawCircle(48, 15, 9, SecondaryColor);
} else { } else {
tft.drawCircle(43, 15, 10, GreyoutColor); tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor);
tft.drawCircle(43, 15, 9, GreyoutColor);
tft.drawCircle(53, 15, 10, GreyoutColor);
tft.drawCircle(53, 15, 9, GreyoutColor);
} }
tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16); tftPrint(-1, "TP", 2, 51, GreyoutColor, BackgroundColor, 16);
@@ -2961,16 +2981,15 @@ void BuildDisplay() {
tft.drawRect(0, 0, 320, 240, FrameColor); tft.drawRect(0, 0, 320, 240, FrameColor);
tft.drawLine(0, 30, 320, 30, FrameColor); tft.drawLine(0, 30, 320, 30, FrameColor);
tft.drawLine(0, 100, 320, 100, FrameColor); tft.drawLine(0, 100, 320, 100, FrameColor);
tft.drawLine(107, 15, 160, 15, FrameColor); tft.drawLine(105, 30, 105, 0, FrameColor);
tft.drawLine(107, 30, 107, 0, FrameColor);
tft.drawLine(210, 100, 210, 217, FrameColor); tft.drawLine(210, 100, 210, 217, FrameColor);
tft.drawLine(248, 30, 248, 0, FrameColor); tft.drawLine(248, 30, 248, 0, FrameColor);
tft.drawLine(0, 160, 210, 160, FrameColor); tft.drawLine(0, 160, 210, 160, FrameColor);
tft.drawLine(0, 180, 320, 180, FrameColor); tft.drawLine(0, 180, 320, 180, FrameColor);
tft.drawLine(0, 217, 320, 217, FrameColor); tft.drawLine(0, 217, 320, 217, FrameColor);
tft.drawLine(30, 30, 30, 0, FrameColor); tft.drawLine(30, 30, 30, 0, FrameColor);
tft.drawLine(67, 30, 67, 0, FrameColor); tft.drawLine(66, 30, 66, 0, FrameColor);
tft.drawLine(160, 30, 160, 0, FrameColor); tft.drawLine(162, 30, 162, 0, FrameColor);
tft.drawLine(16, 114, 202, 114, ActiveColor); tft.drawLine(16, 114, 202, 114, ActiveColor);
if (!showmodulation) tft.drawLine(16, 143, 202, 143, GreyoutColor); else tft.drawLine(16, 143, 202, 143, ActiveColor); if (!showmodulation) tft.drawLine(16, 143, 202, 143, GreyoutColor); else tft.drawLine(16, 143, 202, 143, ActiveColor);
@@ -3017,20 +3036,16 @@ void BuildDisplay() {
tftPrint(-1, "100", 164, 144, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "100", 164, 144, ActiveColor, ActiveColorSmooth, 16);
} }
tftPrint(-1, "kHz", 203, 4, ActiveColor, ActiveColorSmooth, 28); tftPrint(-1, "kHz", 205, 4, ActiveColor, ActiveColorSmooth, 28);
tftPrint(-1, unitString[unit], 282, 145, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, unitString[unit], 282, 145, ActiveColor, ActiveColorSmooth, 16);
tft.drawBitmap(70, 5, RDSLogo, 35, 22, GreyoutColor); tft.drawBitmap(68, 5, RDSLogo, 35, 22, GreyoutColor);
tft.drawBitmap(253, 140, Speaker, 21, 20, GreyoutColor); tft.drawBitmap(253, 142, Speaker, 21, 20, GreyoutColor);
if (!StereoToggle) { if (!StereoToggle) {
tft.drawCircle(48, 15, 10, SecondaryColor); tft.drawBitmap(38, 5, Mono, 22, 22, SecondaryColor);
tft.drawCircle(48, 15, 9, SecondaryColor);
} else { } else {
tft.drawCircle(43, 15, 10, GreyoutColor); tft.drawBitmap(32, 5, Stereo, 32, 22, GreyoutColor);
tft.drawCircle(43, 15, 9, GreyoutColor);
tft.drawCircle(53, 15, 10, GreyoutColor);
tft.drawCircle(53, 15, 9, GreyoutColor);
} }
if (autosquelch) showAutoSquelch(1); if (autosquelch) showAutoSquelch(1);
+2
View File
@@ -173,6 +173,8 @@ extern int Squelchold;
extern int SStatusold; extern int SStatusold;
extern int StereoColor; extern int StereoColor;
extern int StereoColorSmooth; extern int StereoColorSmooth;
extern int WifiColorHigh;
extern int WifiColorLow;
extern int xPos; extern int xPos;
extern int xPos2; extern int xPos2;
extern int xPos3; extern int xPos3;
+9 -9
View File
@@ -805,7 +805,7 @@ void showCT() {
} else if (hour > 12) { } else if (hour > 12) {
hour -= 12; // Convert PM hours hour -= 12; // Convert PM hours
} }
sprintf(timeStr, "%d:%02d%s", hour, localtime(&t)->tm_min, ampm.c_str()); sprintf(timeStr, "%d:%02d %s", hour, localtime(&t)->tm_min, ampm.c_str());
} else { // Other regions: 24-hour format } else { // Other regions: 24-hour format
strftime(timeStr, sizeof(timeStr), "%H:%M", localtime(&t)); strftime(timeStr, sizeof(timeStr), "%H:%M", localtime(&t));
} }
@@ -828,17 +828,17 @@ void showCT() {
} }
// Display the updated time and date // Display the updated time and date
tftReplace(0, rds_clockold, rds_clock, 135, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16); tftReplace(0, rds_clockold, rds_clock, 134, 1, RDSColor, RDSColorSmooth, BackgroundColor, 16);
tftReplace(0, rds_dateold, rds_date, 135, 16, RDSColor, RDSColorSmooth, BackgroundColor, 16); tftReplace(0, rds_dateold, rds_date, 134, 16, RDSColor, RDSColorSmooth, BackgroundColor, 16);
} else { // Handle dropout scenarios } else { // Handle dropout scenarios
if (rtcset) { // Display dropout message if RTC was set if (rtcset) { // Display dropout message if RTC was set
tftReplace(0, rds_clockold, rds_clock, 135, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); tftReplace(0, rds_clockold, rds_clock, 134, 1, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
tftReplace(0, rds_dateold, rds_date, 135, 16, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16); tftReplace(0, rds_dateold, rds_date, 134, 16, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor, 16);
} else { // Clear and reprint the clock and date } else { // Clear and reprint the clock and date
tftPrint(0, rds_clockold, 135, 1, BackgroundColor, BackgroundColor, 16); tftPrint(0, rds_clockold, 134, 1, BackgroundColor, BackgroundColor, 16);
tftPrint(0, rds_clock, 135, 1, BackgroundColor, BackgroundColor, 16); tftPrint(0, rds_clock, 134, 1, BackgroundColor, BackgroundColor, 16);
tftPrint(0, rds_dateold, 135, 16, BackgroundColor, BackgroundColor, 16); tftPrint(0, rds_dateold, 134, 16, BackgroundColor, BackgroundColor, 16);
tftPrint(0, rds_date, 135, 16, BackgroundColor, BackgroundColor, 16); tftPrint(0, rds_date, 134, 16, BackgroundColor, BackgroundColor, 16);
} }
} }
} }