GUI optimalisation and bugfixes
Mute symbol added
This commit is contained in:
+140
-66
@@ -2,6 +2,7 @@
|
|||||||
#include <EEPROM.h>
|
#include <EEPROM.h>
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <FS.h>
|
||||||
#include <TFT_eSPI.h> // https://github.com/Bodmer/TFT_eSPI
|
#include <TFT_eSPI.h> // https://github.com/Bodmer/TFT_eSPI
|
||||||
#include <TimeLib.h> // https://github.com/PaulStoffregen/Time
|
#include <TimeLib.h> // https://github.com/PaulStoffregen/Time
|
||||||
#include <Hash.h> // https://github.com/bbx10/Hash_tng
|
#include <Hash.h> // https://github.com/bbx10/Hash_tng
|
||||||
@@ -187,10 +188,10 @@ int Stereostatus;
|
|||||||
int volume;
|
int volume;
|
||||||
int XDRBWset;
|
int XDRBWset;
|
||||||
int XDRBWsetold;
|
int XDRBWsetold;
|
||||||
int xPos = 6;
|
int xPos;
|
||||||
int xPos2 = 6;
|
int xPos2;
|
||||||
int xPos3 = 6;
|
int xPos3;
|
||||||
int xPos4 = 6;
|
int xPos4;
|
||||||
int16_t OStatus;
|
int16_t OStatus;
|
||||||
int16_t SAvg;
|
int16_t SAvg;
|
||||||
int16_t SAvg2;
|
int16_t SAvg2;
|
||||||
@@ -199,10 +200,12 @@ int8_t LevelOffset;
|
|||||||
int8_t LowLevelSet;
|
int8_t LowLevelSet;
|
||||||
int8_t VolSet;
|
int8_t VolSet;
|
||||||
IPAddress remoteip;
|
IPAddress remoteip;
|
||||||
|
String afstringold;
|
||||||
String cryptedpassword;
|
String cryptedpassword;
|
||||||
String CurrentThemeString;
|
String CurrentThemeString;
|
||||||
String ECColdtxt;
|
String ECColdtxt;
|
||||||
String eonpsold[11];
|
String eonpsold[11];
|
||||||
|
String eonstringold;
|
||||||
String LIColdString;
|
String LIColdString;
|
||||||
String pinstringold;
|
String pinstringold;
|
||||||
String PIold;
|
String PIold;
|
||||||
@@ -215,6 +218,7 @@ String rds_clockold;
|
|||||||
String RDSSPYRDS;
|
String RDSSPYRDS;
|
||||||
String RDSSPYRDSold;
|
String RDSSPYRDSold;
|
||||||
String RTold;
|
String RTold;
|
||||||
|
String rtplusstringold;
|
||||||
String salt;
|
String salt;
|
||||||
String saltkey = " ";
|
String saltkey = " ";
|
||||||
String SWMIBandstring = String();
|
String SWMIBandstring = String();
|
||||||
@@ -579,8 +583,10 @@ void setup() {
|
|||||||
SelectBand();
|
SelectBand();
|
||||||
|
|
||||||
setupmode = false;
|
setupmode = false;
|
||||||
sprite.createSprite(317, 16);
|
sprite.createSprite(280, 16);
|
||||||
sprite2.createSprite(172, 16);
|
sprite2.createSprite(172, 16);
|
||||||
|
sprite.setTextDatum(TL_DATUM);
|
||||||
|
sprite2.setTextDatum(TL_DATUM);
|
||||||
radio.tone(50, -5, 2000);
|
radio.tone(50, -5, 2000);
|
||||||
|
|
||||||
if (screensaverset) {
|
if (screensaverset) {
|
||||||
@@ -595,7 +601,7 @@ void loop() {
|
|||||||
if (power == true) {
|
if (power == true) {
|
||||||
Communication();
|
Communication();
|
||||||
|
|
||||||
if (af && radio.rds.correctPI != 0) {
|
if (band == BAND_FM && af && radio.rds.correctPI != 0) {
|
||||||
if ((aftest && millis() >= aftimer + 3000) || ((USN > 250 || WAM > 250) && millis() >= aftimer + 1000)) {
|
if ((aftest && millis() >= aftimer + 3000) || ((USN > 250 || WAM > 250) && millis() >= aftimer + 1000)) {
|
||||||
aftimer = millis();
|
aftimer = millis();
|
||||||
aftest = false;
|
aftest = false;
|
||||||
@@ -607,7 +613,7 @@ void loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (millis() >= aftimer + 10000) {
|
if (band == BAND_FM && millis() >= aftimer + 10000) {
|
||||||
aftimer = millis();
|
aftimer = millis();
|
||||||
if (USN > 150 || WAM > 150) {
|
if (USN > 150 || WAM > 150) {
|
||||||
frequency = radio.TestAF();
|
frequency = radio.TestAF();
|
||||||
@@ -642,6 +648,7 @@ void loop() {
|
|||||||
if (region == 0) tftPrint(-1, "PI:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
if (region == 0) tftPrint(-1, "PI:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
if (region == 1) tftPrint(-1, "ID:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
if (region == 1) tftPrint(-1, "ID:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, "PS:", 6, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, "PS:", 6, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
|
tftPrint(-1, "RT:", 6, 222, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, "PTY:", 6, 170, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, "PTY:", 6, 170, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
if (!showmodulation) tft.drawLine(20, 150, 204, 150, GreyoutColor); else tft.drawLine(20, 150, 204, 150, TFT_DARKGREY);
|
if (!showmodulation) tft.drawLine(20, 150, 204, 150, GreyoutColor); else tft.drawLine(20, 150, 204, 150, TFT_DARKGREY);
|
||||||
}
|
}
|
||||||
@@ -670,9 +677,10 @@ void loop() {
|
|||||||
if (region == 0) tftPrint(-1, "PI:", 216, 197, GreyoutColor, BackgroundColor, FONT16);
|
if (region == 0) tftPrint(-1, "PI:", 216, 197, GreyoutColor, BackgroundColor, FONT16);
|
||||||
if (region == 1) tftPrint(-1, "ID:", 216, 197, GreyoutColor, BackgroundColor, FONT16);
|
if (region == 1) tftPrint(-1, "ID:", 216, 197, GreyoutColor, BackgroundColor, FONT16);
|
||||||
tftPrint(-1, "PS:", 6, 197, GreyoutColor, BackgroundColor, FONT16);
|
tftPrint(-1, "PS:", 6, 197, GreyoutColor, BackgroundColor, FONT16);
|
||||||
|
tftPrint(-1, "RT:", 6, 222, GreyoutColor, BackgroundColor, FONT16);
|
||||||
tftPrint(-1, "PTY:", 6, 170, GreyoutColor, BackgroundColor, FONT16);
|
tftPrint(-1, "PTY:", 6, 170, GreyoutColor, BackgroundColor, FONT16);
|
||||||
tft.drawLine(20, 150, 204, 150, GreyoutColor);
|
tft.drawLine(20, 150, 204, 150, GreyoutColor);
|
||||||
tft.drawBitmap(110, 5, RDSLogo, 67, 22, GreyoutColor);
|
tft.drawBitmap(139, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||||
}
|
}
|
||||||
LowLevelInit = false;
|
LowLevelInit = false;
|
||||||
}
|
}
|
||||||
@@ -1334,11 +1342,12 @@ void SelectBand() {
|
|||||||
doBW();
|
doBW();
|
||||||
radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, SNR);
|
radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, SNR);
|
||||||
if (screenmute == false) radio.clearRDS(fullsearchrds); BuildDisplay();
|
if (screenmute == false) radio.clearRDS(fullsearchrds); BuildDisplay();
|
||||||
if (region == 0) tftPrint(-1, "PI:", 216, 197, PrimaryColor, PrimaryColorSmooth, FONT16);
|
if (region == 0) tftPrint(-1, "PI:", 216, 197, GreyoutColor, BackgroundColor, FONT16);
|
||||||
if (region == 1) tftPrint(-1, "ID:", 216, 195, PrimaryColor, PrimaryColorSmooth, FONT16);
|
if (region == 1) tftPrint(-1, "ID:", 216, 195, GreyoutColor, BackgroundColor, FONT16);
|
||||||
tftPrint(-1, "PS:", 6, 197, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, "PS:", 6, 197, GreyoutColor, BackgroundColor, FONT16);
|
||||||
tftPrint(-1, "PTY:", 6, 170, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, "RT:", 6, 222, GreyoutColor, BackgroundColor, FONT16);
|
||||||
tft.drawBitmap(110, 5, RDSLogo, 67, 22, GreyoutColor);
|
tftPrint(-1, "PTY:", 6, 170, GreyoutColor, BackgroundColor, FONT16);
|
||||||
|
tft.drawBitmap(139, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||||
tft.drawRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
tft.drawRoundRect(248, 56, 32, 20, 5, GreyoutColor);
|
||||||
tftPrint(0, "iMS", 265, 59, GreyoutColor, BackgroundColor, FONT16);
|
tftPrint(0, "iMS", 265, 59, GreyoutColor, BackgroundColor, FONT16);
|
||||||
tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
tft.drawRoundRect(286, 56, 32, 20, 5, GreyoutColor);
|
||||||
@@ -2783,7 +2792,7 @@ void readRds() {
|
|||||||
if (advancedRDS) tftPrint(-1, PIold, 244, 76, SecondaryColor, SecondaryColorSmooth, FONT28); else tftPrint(-1, PIold, 244, 191, SecondaryColor, SecondaryColorSmooth, FONT28);
|
if (advancedRDS) tftPrint(-1, PIold, 244, 76, SecondaryColor, SecondaryColorSmooth, FONT28); else tftPrint(-1, PIold, 244, 191, SecondaryColor, SecondaryColorSmooth, FONT28);
|
||||||
if (advancedRDS) tftPrint(-1, PSold, 38, 76, SecondaryColor, SecondaryColorSmooth, FONT28); else tftPrint(-1, PSold, 38, 191, SecondaryColor, SecondaryColorSmooth, FONT28);
|
if (advancedRDS) tftPrint(-1, PSold, 38, 76, SecondaryColor, SecondaryColorSmooth, FONT28); else tftPrint(-1, PSold, 38, 191, SecondaryColor, SecondaryColorSmooth, FONT28);
|
||||||
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, PTYold, 38, 170, SecondaryColor, SecondaryColorSmooth, FONT16);
|
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, PTYold, 38, 170, SecondaryColor, SecondaryColorSmooth, FONT16);
|
||||||
if (advancedRDS) tftPrint(-1, String(ptynold), 255, 109, SecondaryColor, SecondaryColorSmooth, FONT16);
|
if (advancedRDS) tftPrint(-1, String(ptynold), 216, 109, SecondaryColor, SecondaryColorSmooth, FONT16);
|
||||||
if (!advancedRDS) tftPrint(-1, RTold, 1, 229, BackgroundColor, BackgroundColor, FONT16);
|
if (!advancedRDS) tftPrint(-1, RTold, 1, 229, BackgroundColor, BackgroundColor, FONT16);
|
||||||
dropout = true;
|
dropout = true;
|
||||||
aftest = true;
|
aftest = true;
|
||||||
@@ -2793,7 +2802,7 @@ void readRds() {
|
|||||||
if (advancedRDS) tftPrint(-1, PIold, 244, 76, PrimaryColor, PrimaryColorSmooth, FONT28); else tftPrint(-1, PIold, 244, 191, PrimaryColor, PrimaryColorSmooth, FONT28);
|
if (advancedRDS) tftPrint(-1, PIold, 244, 76, PrimaryColor, PrimaryColorSmooth, FONT28); else tftPrint(-1, PIold, 244, 191, PrimaryColor, PrimaryColorSmooth, FONT28);
|
||||||
if (advancedRDS) tftPrint(-1, PSold, 38, 76, PrimaryColor, PrimaryColorSmooth, FONT28); else tftPrint(-1, PSold, 38, 191, PrimaryColor, PrimaryColorSmooth, FONT28);
|
if (advancedRDS) tftPrint(-1, PSold, 38, 76, PrimaryColor, PrimaryColorSmooth, FONT28); else tftPrint(-1, PSold, 38, 191, PrimaryColor, PrimaryColorSmooth, FONT28);
|
||||||
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, PTYold, 38, 170, PrimaryColor, PrimaryColorSmooth, FONT16);
|
if (advancedRDS) tftPrint(-1, PTYold, 38, 109, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(-1, PTYold, 38, 170, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
if (advancedRDS) tftPrint(-1, String(ptynold), 255, 109, PrimaryColor, PrimaryColorSmooth, FONT16);
|
if (advancedRDS) tftPrint(-1, String(ptynold), 216, 109, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
dropout = false;
|
dropout = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2942,18 +2951,28 @@ void ShowAdvancedRDS() {
|
|||||||
if (radio.rds.hasAF) tftPrint(-1, "AF", 50, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, FONT16);
|
if (radio.rds.hasAF) tftPrint(-1, "AF", 50, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "AF", 50, 51, GreyoutColor, BackgroundColor, FONT16);
|
||||||
hasafold = radio.rds.hasAF;
|
hasafold = radio.rds.hasAF;
|
||||||
}
|
}
|
||||||
if (millis() - afticker >= 100) { //500
|
|
||||||
if (xPos2 == 6) {
|
if (afstring.length() < 20) {
|
||||||
|
if (afstringold != afstring) {
|
||||||
|
xPos2 = 0;
|
||||||
|
sprite2.fillSprite(BackgroundColor);
|
||||||
|
sprite2.loadFont(FONT16);
|
||||||
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
|
sprite2.drawString(afstring, xPos2, 0, 1);
|
||||||
|
sprite2.pushSprite(35, 200);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (millis() - afticker >= 50) {
|
||||||
|
if (xPos2 == 0) {
|
||||||
if (millis() - aftickerhold >= 2000) {
|
if (millis() - aftickerhold >= 2000) {
|
||||||
xPos2 -= 1;//charWidth;
|
xPos2 --;
|
||||||
aftickerhold = millis();
|
aftickerhold = millis();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
xPos2 -= 1;//charWidth;
|
xPos2 --;
|
||||||
aftickerhold = millis();
|
aftickerhold = millis();
|
||||||
}
|
}
|
||||||
if (xPos2 < -tft.textWidth(afstring) + (charWidth * 21)) xPos2 = 6;
|
if (xPos2 < -tft.textWidth(afstring) + (charWidth * 16)) xPos2 = 0;
|
||||||
sprite2.setTextDatum(TL_DATUM);
|
|
||||||
sprite2.fillSprite(BackgroundColor);
|
sprite2.fillSprite(BackgroundColor);
|
||||||
sprite2.loadFont(FONT16);
|
sprite2.loadFont(FONT16);
|
||||||
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
@@ -2961,6 +2980,8 @@ void ShowAdvancedRDS() {
|
|||||||
sprite2.pushSprite(35, 200);
|
sprite2.pushSprite(35, 200);
|
||||||
afticker = millis();
|
afticker = millis();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
afstringold = afstring;
|
||||||
|
|
||||||
String eonstring;
|
String eonstring;
|
||||||
if (radio.rds.hasEON) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? " " : " | "); else eonstring = myLanguage[language][88];
|
if (radio.rds.hasEON) for (byte i = 0; i < radio.eon_counter; i++) eonstring += String(radio.eon[i].picode) + (radio.eon[i].ps.length() > 0 ? String(": " + String(radio.eon[i].ps)) : "") + (radio.eon[i].mappedfreq > 0 ? String(" " + String(radio.eon[i].mappedfreq / 100) + "." + String((radio.eon[i].mappedfreq % 100) / 10)) : "") + (radio.eon[i].mappedfreq2 > 0 ? String(" / " + String(radio.eon[i].mappedfreq2 / 100) + "." + String((radio.eon[i].mappedfreq2 % 100) / 10)) : "") + (radio.eon[i].mappedfreq3 > 0 ? String(" / " + String(radio.eon[i].mappedfreq3 / 100) + "." + String((radio.eon[i].mappedfreq3 % 100) / 10)) : "") + (i == radio.eon_counter - 1 ? " " : " | "); else eonstring = myLanguage[language][88];
|
||||||
@@ -2968,18 +2989,27 @@ void ShowAdvancedRDS() {
|
|||||||
if (radio.rds.hasEON) tftPrint(-1, "EON", 153, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, FONT16);
|
if (radio.rds.hasEON) tftPrint(-1, "EON", 153, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "EON", 153, 51, GreyoutColor, BackgroundColor, FONT16);
|
||||||
haseonold = radio.rds.hasEON;
|
haseonold = radio.rds.hasEON;
|
||||||
}
|
}
|
||||||
if (millis() - eonticker >= 100) { //500
|
if (eonstring.length() < 20) {
|
||||||
if (xPos3 == 6) {
|
if (eonstringold != eonstring) {
|
||||||
|
xPos3 = 0;
|
||||||
|
sprite2.fillSprite(BackgroundColor);
|
||||||
|
sprite2.loadFont(FONT16);
|
||||||
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
|
sprite2.drawString(eonstring, xPos3, 0);
|
||||||
|
sprite2.pushSprite(35, 175);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (millis() - eonticker >= 50) {
|
||||||
|
if (xPos3 == 0) {
|
||||||
if (millis() - eontickerhold >= 2000) {
|
if (millis() - eontickerhold >= 2000) {
|
||||||
xPos3 -= 1;//charWidth;
|
xPos3 --;
|
||||||
eontickerhold = millis();
|
eontickerhold = millis();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
xPos3 -= 1;//charWidth;
|
xPos3 --;
|
||||||
eontickerhold = millis();
|
eontickerhold = millis();
|
||||||
}
|
}
|
||||||
if (xPos3 < -tft.textWidth(eonstring) + (charWidth * 21)) xPos3 = 6;
|
if (xPos3 < -tft.textWidth(eonstring) + (charWidth * 16)) xPos3 = 0;
|
||||||
sprite2.setTextDatum(TL_DATUM);
|
|
||||||
sprite2.fillSprite(BackgroundColor);
|
sprite2.fillSprite(BackgroundColor);
|
||||||
sprite2.loadFont(FONT16);
|
sprite2.loadFont(FONT16);
|
||||||
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
@@ -2987,6 +3017,8 @@ void ShowAdvancedRDS() {
|
|||||||
sprite2.pushSprite(35, 175);
|
sprite2.pushSprite(35, 175);
|
||||||
eonticker = millis();
|
eonticker = millis();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
eonstringold = eonstring;
|
||||||
|
|
||||||
String rtplusstring;
|
String rtplusstring;
|
||||||
if (radio.rds.hasRDSplus) rtplusstring = "1) " + String(radio.rds.RTContent1) + " - 2) " + String(radio.rds.RTContent2) + " "; else rtplusstring = myLanguage[language][89];
|
if (radio.rds.hasRDSplus) rtplusstring = "1) " + String(radio.rds.RTContent1) + " - 2) " + String(radio.rds.RTContent2) + " "; else rtplusstring = myLanguage[language][89];
|
||||||
@@ -2994,18 +3026,27 @@ void ShowAdvancedRDS() {
|
|||||||
if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 124, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "RT+", 124, 51, GreyoutColor, BackgroundColor, FONT16);
|
if (radio.rds.hasRDSplus) tftPrint(-1, "RT+", 124, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "RT+", 124, 51, GreyoutColor, BackgroundColor, FONT16);
|
||||||
hasrtplusold = radio.rds.hasRDSplus;
|
hasrtplusold = radio.rds.hasRDSplus;
|
||||||
}
|
}
|
||||||
if (millis() - rtplusticker >= 100) { //350
|
if (eonstring.length() < 20) {
|
||||||
if (xPos3 == 6) {
|
if (rtplusstringold != rtplusstring) {
|
||||||
|
xPos4 = 0;
|
||||||
|
sprite2.fillSprite(BackgroundColor);
|
||||||
|
sprite2.loadFont(FONT16);
|
||||||
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
|
sprite2.drawString(rtplusstring, xPos4, 0);
|
||||||
|
sprite2.pushSprite(35, 150);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (millis() - rtplusticker >= 50)
|
||||||
|
if (xPos4 == 0) {
|
||||||
if (millis() - rtplustickerhold >= 2000) {
|
if (millis() - rtplustickerhold >= 2000) {
|
||||||
xPos4 -= 1;//charWidth;
|
xPos4 --;
|
||||||
rtplustickerhold = millis();
|
rtplustickerhold = millis();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
xPos4 -= 1;//charWidth;
|
xPos4 --;
|
||||||
rtplustickerhold = millis();
|
rtplustickerhold = millis();
|
||||||
}
|
}
|
||||||
if (xPos4 < -tft.textWidth(rtplusstring) + (charWidth * 21)) xPos4 = 6;
|
if (xPos4 < -tft.textWidth(rtplusstring) + (charWidth * 16)) xPos4 = 0;
|
||||||
sprite2.setTextDatum(TL_DATUM);
|
|
||||||
sprite2.fillSprite(BackgroundColor);
|
sprite2.fillSprite(BackgroundColor);
|
||||||
sprite2.loadFont(FONT16);
|
sprite2.loadFont(FONT16);
|
||||||
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
@@ -3013,6 +3054,7 @@ void ShowAdvancedRDS() {
|
|||||||
sprite2.pushSprite(35, 150);
|
sprite2.pushSprite(35, 150);
|
||||||
rtplusticker = millis();
|
rtplusticker = millis();
|
||||||
}
|
}
|
||||||
|
rtplusstringold = rtplusstring;
|
||||||
|
|
||||||
if (TPold != radio.rds.hasTP) {
|
if (TPold != radio.rds.hasTP) {
|
||||||
if (radio.rds.hasTP == true) tftPrint(-1, "TP", 6, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "TP", 6, 51, GreyoutColor, BackgroundColor, FONT16);
|
if (radio.rds.hasTP == true) tftPrint(-1, "TP", 6, 51, SecondaryColor, SecondaryColorSmooth, FONT16); else tftPrint(-1, "TP", 6, 51, GreyoutColor, BackgroundColor, FONT16);
|
||||||
@@ -3254,44 +3296,56 @@ void showPS() {
|
|||||||
|
|
||||||
void showRadioText() {
|
void showRadioText() {
|
||||||
if (radio.rds.hasRT && RDSstatus) {
|
if (radio.rds.hasRT && RDSstatus) {
|
||||||
if (millis() - rtticker >= 100) { // 350
|
if (advancedRDS && radio.rds.stationText.length() < 20) {
|
||||||
if (xPos == 6) {
|
xPos = 0;
|
||||||
if (millis() - rttickerhold >= 2000) {
|
|
||||||
xPos -= 1;//= charWidth;
|
|
||||||
rttickerhold = millis();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
xPos -= 1;//= charWidth;
|
|
||||||
rttickerhold = millis();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (advancedRDS) {
|
|
||||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 21)) xPos = 6;
|
|
||||||
sprite2.fillSprite(BackgroundColor);
|
sprite2.fillSprite(BackgroundColor);
|
||||||
sprite2.setTextDatum(TL_DATUM);
|
|
||||||
sprite2.loadFont(FONT16);
|
sprite2.loadFont(FONT16);
|
||||||
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
sprite2.fillSprite(BackgroundColor);
|
|
||||||
sprite2.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 0, 1);
|
sprite2.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 0, 1);
|
||||||
sprite2.pushSprite(35, 222);
|
sprite2.pushSprite(35, 222);
|
||||||
} else {
|
} else if (!advancedRDS && radio.rds.stationText.length() < 29) {
|
||||||
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 24)) xPos = 6;
|
if (RTold != radio.rds.stationText + " " + radio.rds.stationText32) {
|
||||||
sprite.fillSprite(BackgroundColor);
|
xPos = 0;
|
||||||
sprite.setTextDatum(TL_DATUM);
|
|
||||||
sprite.fillSprite(BackgroundColor);
|
sprite.fillSprite(BackgroundColor);
|
||||||
sprite.loadFont(FONT16);
|
sprite.loadFont(FONT16);
|
||||||
sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
sprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 0, 1);
|
sprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 0, 1);
|
||||||
sprite.pushSprite(1, 222);
|
sprite.pushSprite(38, 222);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (millis() - rtticker >= 50) {
|
||||||
|
if (xPos == 0) {
|
||||||
|
if (millis() - rttickerhold >= 2000) {
|
||||||
|
xPos --;
|
||||||
|
rttickerhold = millis();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
xPos --;
|
||||||
|
rttickerhold = millis();
|
||||||
|
}
|
||||||
|
if (advancedRDS) {
|
||||||
|
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 16)) xPos = 0;
|
||||||
|
sprite2.fillSprite(BackgroundColor);
|
||||||
|
sprite2.loadFont(FONT16);
|
||||||
|
sprite2.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
|
sprite2.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 0, 1);
|
||||||
|
sprite2.pushSprite(35, 222);
|
||||||
|
} else {
|
||||||
|
if (xPos < -tft.textWidth(radio.rds.stationText + " " + radio.rds.stationText32) + (charWidth * 26)) xPos = 0;
|
||||||
|
sprite.fillSprite(BackgroundColor);
|
||||||
|
sprite.loadFont(FONT16);
|
||||||
|
sprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false);
|
||||||
|
sprite.drawString(radio.rds.stationText + " " + radio.rds.stationText32, xPos, 0, 1);
|
||||||
|
sprite.pushSprite(38, 222);
|
||||||
}
|
}
|
||||||
rtticker = millis();
|
rtticker = millis();
|
||||||
RTold = radio.rds.stationText + " " + radio.rds.stationText32;
|
|
||||||
cleanup = true;
|
cleanup = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (cleanup == true) {
|
} else if (cleanup == true) {
|
||||||
sprite.fillSprite(BackgroundColor);
|
sprite.fillSprite(BackgroundColor);
|
||||||
sprite2.fillSprite(BackgroundColor);
|
sprite2.fillSprite(BackgroundColor);
|
||||||
if (advancedRDS) sprite2.pushSprite(35, 222); else sprite.pushSprite(1, 222);
|
if (advancedRDS) sprite2.pushSprite(35, 222); else sprite.pushSprite(38, 222);
|
||||||
cleanup = false;
|
cleanup = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3309,6 +3363,7 @@ void showRadioText() {
|
|||||||
Udp.endPacket();
|
Udp.endPacket();
|
||||||
}
|
}
|
||||||
tft.drawLine(0, 239, 320, 239, FrameColor);
|
tft.drawLine(0, 239, 320, 239, FrameColor);
|
||||||
|
RTold = radio.rds.stationText + " " + radio.rds.stationText32;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildMenu() {
|
void BuildMenu() {
|
||||||
@@ -3362,7 +3417,7 @@ void BuildMenu() {
|
|||||||
tftPrint(-1, myLanguage[language][45], 14, 116, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, myLanguage[language][45], 14, 116, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, myLanguage[language][46], 14, 136, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, myLanguage[language][46], 14, 136, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, myLanguage[language][49], 14, 156, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, myLanguage[language][49], 14, 156, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, myLanguage[language][49], 14, 176, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, myLanguage[language][50], 14, 176, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
if (wifi) tftPrint(-1, String(myLanguage[language][51]) + " IP: " + String(WiFi.localIP().toString()), 14, 196, ActiveColor, ActiveColorSmooth, FONT16); else tftPrint(-1, myLanguage[language][51], 14, 196, ActiveColor, ActiveColorSmooth, FONT16);
|
if (wifi) tftPrint(-1, String(myLanguage[language][51]) + " IP: " + String(WiFi.localIP().toString()), 14, 196, ActiveColor, ActiveColorSmooth, FONT16); else tftPrint(-1, myLanguage[language][51], 14, 196, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, myLanguage[language][52], 14, 216, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, myLanguage[language][52], 14, 216, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
|
|
||||||
@@ -3376,7 +3431,7 @@ void BuildMenu() {
|
|||||||
if (radio.rds.underscore) tftPrint(1, myLanguage[language][42], 305, 156, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, myLanguage[language][30], 305, 156, PrimaryColor, PrimaryColorSmooth, FONT16);
|
if (radio.rds.underscore) tftPrint(1, myLanguage[language][42], 305, 156, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, myLanguage[language][30], 305, 156, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
if (USBmode) tftPrint(1, "RDS Spy", 305, 176, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, "XDRGTK", 305, 176, PrimaryColor, PrimaryColorSmooth, FONT16);
|
if (USBmode) tftPrint(1, "RDS Spy", 305, 176, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, "XDRGTK", 305, 176, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
if (wifi) tftPrint(1, myLanguage[language][42], 305, 196, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, myLanguage[language][30], 305, 196, PrimaryColor, PrimaryColorSmooth, FONT16);
|
if (wifi) tftPrint(1, myLanguage[language][42], 305, 196, PrimaryColor, PrimaryColorSmooth, FONT16); else tftPrint(1, myLanguage[language][30], 305, 196, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
tftPrint(1, "->", 305, 196, PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(1, ">", 305, 216, PrimaryColor, PrimaryColorSmooth, FONT16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
@@ -3504,7 +3559,7 @@ void ShowAFEON() {
|
|||||||
tftPrint(-1, String(eonpsold[i]), 218, 54 + (15 * i), BackgroundColor, BackgroundColor, FONT16);
|
tftPrint(-1, String(eonpsold[i]), 218, 54 + (15 * i), BackgroundColor, BackgroundColor, FONT16);
|
||||||
eonpsold[i] = radio.eon[i].ps;
|
eonpsold[i] = radio.eon[i].ps;
|
||||||
}
|
}
|
||||||
tftPrint(-1, String(radio.eon[i].ps), 218, 54 + (15 * i), PrimaryColor, PrimaryColorSmooth, FONT16);
|
tftPrint(-1, String(radio.eon[i].ps), 218, 54 + (15 * i), SecondaryColor, SecondaryColorSmooth, FONT16);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radio.eon[i].mappedfreq > 0) {
|
if (radio.eon[i].mappedfreq > 0) {
|
||||||
@@ -3626,7 +3681,7 @@ void BuildAdvancedRDS() {
|
|||||||
tft.drawCircle(81, 15, 9, GreyoutColor);
|
tft.drawCircle(81, 15, 9, GreyoutColor);
|
||||||
tft.drawCircle(91, 15, 10, GreyoutColor);
|
tft.drawCircle(91, 15, 10, GreyoutColor);
|
||||||
tft.drawCircle(91, 15, 9, GreyoutColor);
|
tft.drawCircle(91, 15, 9, GreyoutColor);
|
||||||
tft.drawBitmap(110, 5, RDSLogo, 67, 22, GreyoutColor);
|
tft.drawBitmap(139, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||||
|
|
||||||
if (StereoToggle == false) {
|
if (StereoToggle == false) {
|
||||||
tft.drawCircle(86, 15, 10, SecondaryColor);
|
tft.drawCircle(86, 15, 10, SecondaryColor);
|
||||||
@@ -3696,6 +3751,7 @@ void BuildDisplay() {
|
|||||||
tft.drawLine(0, 187, 320, 187, FrameColor);
|
tft.drawLine(0, 187, 320, 187, FrameColor);
|
||||||
tft.drawLine(0, 218, 320, 218, FrameColor);
|
tft.drawLine(0, 218, 320, 218, FrameColor);
|
||||||
tft.drawLine(108, 30, 108, 0, FrameColor);
|
tft.drawLine(108, 30, 108, 0, FrameColor);
|
||||||
|
tft.drawLine(137, 30, 137, 0, FrameColor);
|
||||||
tft.drawLine(174, 30, 174, 0, FrameColor);
|
tft.drawLine(174, 30, 174, 0, FrameColor);
|
||||||
tft.drawLine(20, 120, 204, 120, TFT_DARKGREY);
|
tft.drawLine(20, 120, 204, 120, TFT_DARKGREY);
|
||||||
if (!showmodulation) tft.drawLine(20, 150, 204, 150, GreyoutColor); else tft.drawLine(20, 150, 204, 150, TFT_DARKGREY);
|
if (!showmodulation) tft.drawLine(20, 150, 204, 150, GreyoutColor); else tft.drawLine(20, 150, 204, 150, TFT_DARKGREY);
|
||||||
@@ -3718,6 +3774,7 @@ void BuildDisplay() {
|
|||||||
if (region == 0) tftPrint(-1, "PI:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
if (region == 0) tftPrint(-1, "PI:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
if (region == 1) tftPrint(-1, "ID:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
if (region == 1) tftPrint(-1, "ID:", 216, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, "PS:", 6, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, "PS:", 6, 197, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
|
tftPrint(-1, "RT:", 6, 222, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
tftPrint(-1, "PTY:", 6, 170, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(-1, "PTY:", 6, 170, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
|
|
||||||
tftPrint(0, "S", 7, 107, ActiveColor, ActiveColorSmooth, FONT16);
|
tftPrint(0, "S", 7, 107, ActiveColor, ActiveColorSmooth, FONT16);
|
||||||
@@ -3756,7 +3813,7 @@ void BuildDisplay() {
|
|||||||
tft.drawCircle(81, 15, 9, GreyoutColor);
|
tft.drawCircle(81, 15, 9, GreyoutColor);
|
||||||
tft.drawCircle(91, 15, 10, GreyoutColor);
|
tft.drawCircle(91, 15, 10, GreyoutColor);
|
||||||
tft.drawCircle(91, 15, 9, GreyoutColor);
|
tft.drawCircle(91, 15, 9, GreyoutColor);
|
||||||
tft.drawBitmap(110, 5, RDSLogo, 67, 22, GreyoutColor);
|
tft.drawBitmap(139, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||||
if (StereoToggle == false) {
|
if (StereoToggle == false) {
|
||||||
tft.drawCircle(86, 15, 10, SecondaryColor);
|
tft.drawCircle(86, 15, 10, SecondaryColor);
|
||||||
tft.drawCircle(86, 15, 9, SecondaryColor);
|
tft.drawCircle(86, 15, 9, SecondaryColor);
|
||||||
@@ -3958,7 +4015,7 @@ void ShowSignalLevel() {
|
|||||||
void ShowRDSLogo(bool RDSstatus) {
|
void ShowRDSLogo(bool RDSstatus) {
|
||||||
if (screenmute == false) {
|
if (screenmute == false) {
|
||||||
if (RDSstatus != RDSstatusold) {
|
if (RDSstatus != RDSstatusold) {
|
||||||
if (RDSstatus) tft.drawBitmap(110, 5, RDSLogo, 67, 22, SecondaryColor); else tft.drawBitmap(110, 5, RDSLogo, 67, 22, GreyoutColor);
|
if (RDSstatus) tft.drawBitmap(139, 5, RDSLogo, 35, 22, InsignificantColor); else tft.drawBitmap(139, 5, RDSLogo, 35, 22, GreyoutColor);
|
||||||
RDSstatusold = RDSstatus;
|
RDSstatusold = RDSstatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4166,17 +4223,21 @@ void doSquelch() {
|
|||||||
if (Squelch != -1) {
|
if (Squelch != -1) {
|
||||||
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
|
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
SQ = false;
|
SQ = false;
|
||||||
} else {
|
} else {
|
||||||
radio.setMute();
|
radio.setMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, PrimaryColor);
|
||||||
SQ = true;
|
SQ = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Stereostatus == true) {
|
if (Stereostatus == true) {
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
SQ = false;
|
SQ = false;
|
||||||
} else {
|
} else {
|
||||||
radio.setMute();
|
radio.setMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, PrimaryColor);
|
||||||
SQ = true;
|
SQ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4204,17 +4265,21 @@ void doSquelch() {
|
|||||||
if (seek == false && Squelch != 920) {
|
if (seek == false && Squelch != 920) {
|
||||||
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
|
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
SQ = false;
|
SQ = false;
|
||||||
} else {
|
} else {
|
||||||
radio.setMute();
|
radio.setMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, PrimaryColor);
|
||||||
SQ = true;
|
SQ = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (seek == false && Stereostatus == true) {
|
if (seek == false && Stereostatus == true) {
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
SQ = false;
|
SQ = false;
|
||||||
} else {
|
} else {
|
||||||
radio.setMute();
|
radio.setMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, PrimaryColor);
|
||||||
SQ = true;
|
SQ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4992,10 +5057,12 @@ void XDRGTKRoutine() {
|
|||||||
VolSet = atoi(buff + 1);
|
VolSet = atoi(buff + 1);
|
||||||
if (VolSet == 0) {
|
if (VolSet == 0) {
|
||||||
radio.setMute();
|
radio.setMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, PrimaryColor);
|
||||||
XDRMute = true;
|
XDRMute = true;
|
||||||
SQ = true;
|
SQ = true;
|
||||||
} else {
|
} else {
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
radio.setVolume((VolSet - 40) / 10);
|
radio.setVolume((VolSet - 40) / 10);
|
||||||
XDRMute = false;
|
XDRMute = false;
|
||||||
}
|
}
|
||||||
@@ -5013,6 +5080,7 @@ void XDRGTKRoutine() {
|
|||||||
store = true;
|
store = true;
|
||||||
XDRMute = false;
|
XDRMute = false;
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
VolSet = EEPROM.readInt(EE_BYTE_VOLSET);
|
VolSet = EEPROM.readInt(EE_BYTE_VOLSET);
|
||||||
LowLevelSet = EEPROM.readInt(EE_BYTE_LOWLEVELSET);
|
LowLevelSet = EEPROM.readInt(EE_BYTE_LOWLEVELSET);
|
||||||
softmuteam = EEPROM.readByte(EE_BYTE_SOFTMUTEAM);
|
softmuteam = EEPROM.readByte(EE_BYTE_SOFTMUTEAM);
|
||||||
@@ -5238,12 +5306,19 @@ void TuneDown() {
|
|||||||
void EdgeBeeper() {
|
void EdgeBeeper() {
|
||||||
bool x = radio.mute;
|
bool x = radio.mute;
|
||||||
radio.tone(50, -5, 2000);
|
radio.tone(50, -5, 2000);
|
||||||
if (x) radio.setMute(); else radio.setUnMute();
|
if (x) {
|
||||||
|
radio.setMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, PrimaryColor);
|
||||||
|
} else {
|
||||||
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Seek(bool mode) {
|
void Seek(bool mode) {
|
||||||
if (band == BAND_FM) {
|
if (band == BAND_FM) {
|
||||||
radio.setMute();
|
radio.setMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, PrimaryColor);
|
||||||
if (mode == false) TuneDown(); else TuneUp();
|
if (mode == false) TuneDown(); else TuneUp();
|
||||||
delay(50);
|
delay(50);
|
||||||
ShowFreq(0);
|
ShowFreq(0);
|
||||||
@@ -5255,6 +5330,7 @@ void Seek(bool mode) {
|
|||||||
if ((USN < 200) && (WAM < 230) && (OStatus < 80 && OStatus > -80) && (Squelch < SStatus || Squelch == 920)) {
|
if ((USN < 200) && (WAM < 230) && (OStatus < 80 && OStatus > -80) && (Squelch < SStatus || Squelch == 920)) {
|
||||||
seek = false;
|
seek = false;
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
|
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
|
||||||
store = true;
|
store = true;
|
||||||
} else {
|
} else {
|
||||||
seek = true;
|
seek = true;
|
||||||
@@ -5275,7 +5351,7 @@ void SetTunerPatch() {
|
|||||||
tft.fillScreen(BackgroundColor);
|
tft.fillScreen(BackgroundColor);
|
||||||
analogWrite(CONTRASTPIN, ContrastSet * 2 + 27);
|
analogWrite(CONTRASTPIN, ContrastSet * 2 + 27);
|
||||||
|
|
||||||
if (TEF == 0) tftPrint(0, myLanguage[language][35], 150, 78, ActiveColor, ActiveColorSmooth, FONT28); else tftPrint(0, myLanguage[language][36], 150, 78, ActiveColor, ActiveColorSmooth, FONT28);
|
if (TEF == 0) tftPrint(0, myLanguage[language][35], 150, 78, ActiveColor, ActiveColorSmooth, FONT28); else tftPrint(0, myLanguage[language][36] + String(TEF), 150, 78, ActiveColor, ActiveColorSmooth, FONT28);
|
||||||
tftPrint(0, myLanguage[language][37], 150, 108, ActiveColor, ActiveColorSmooth, FONT28);
|
tftPrint(0, myLanguage[language][37], 150, 108, ActiveColor, ActiveColorSmooth, FONT28);
|
||||||
EEPROM.writeByte(EE_BYTE_TEF, TEF);
|
EEPROM.writeByte(EE_BYTE_TEF, TEF);
|
||||||
EEPROM.commit();
|
EEPROM.commit();
|
||||||
@@ -5296,7 +5372,7 @@ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de
|
|||||||
GreyoutColor = 0x38E7;
|
GreyoutColor = 0x38E7;
|
||||||
BackgroundColor = TFT_BLACK;
|
BackgroundColor = TFT_BLACK;
|
||||||
ActiveColor = 0xFFFF;
|
ActiveColor = 0xFFFF;
|
||||||
ActiveColorSmooth = 0x4208;
|
ActiveColorSmooth = 0x39E7;
|
||||||
SignificantColor = 0xF800;
|
SignificantColor = 0xF800;
|
||||||
SignificantColorSmooth = 0x7C00;
|
SignificantColorSmooth = 0x7C00;
|
||||||
InsignificantColor = 0x07E0;
|
InsignificantColor = 0x07E0;
|
||||||
@@ -5468,8 +5544,6 @@ void tryWiFi() {
|
|||||||
if (!setupmode) tftPrint(0, myLanguage[language][57], 155, 128, InsignificantColor, InsignificantColorSmooth, FONT28);
|
if (!setupmode) tftPrint(0, myLanguage[language][57], 155, 128, InsignificantColor, InsignificantColorSmooth, FONT28);
|
||||||
wifi = true;
|
wifi = true;
|
||||||
} else {
|
} else {
|
||||||
Server.end();
|
|
||||||
Udp.stop();
|
|
||||||
if (!setupmode) tftPrint(0, myLanguage[language][56], 155, 128, SignificantColor, SignificantColorSmooth, FONT28);
|
if (!setupmode) tftPrint(0, myLanguage[language][56], 155, 128, SignificantColor, SignificantColorSmooth, FONT28);
|
||||||
wifi = false;
|
wifi = false;
|
||||||
XDRGTKTCP = false;
|
XDRGTKTCP = false;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5755
-6030
File diff suppressed because it is too large
Load Diff
+14094
-14704
File diff suppressed because it is too large
Load Diff
@@ -618,7 +618,6 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
RDScharConverter(rt_buffer, RTtext, sizeof(RTtext) / sizeof(wchar_t), true); // Convert 8 bit ASCII to 16 bit ASCII
|
RDScharConverter(rt_buffer, RTtext, sizeof(RTtext) / sizeof(wchar_t), true); // Convert 8 bit ASCII to 16 bit ASCII
|
||||||
rds.stationText = convertToUTF8(RTtext); // Convert RDS characterset to ASCII
|
rds.stationText = convertToUTF8(RTtext); // Convert RDS characterset to ASCII
|
||||||
rds.stationText = extractUTF8Substring(rds.stationText, 0, 64, true); // Make sure RT does not exceed 64 characters
|
rds.stationText = extractUTF8Substring(rds.stationText, 0, 64, true); // Make sure RT does not exceed 64 characters
|
||||||
rds.stationText += " "; // Add extra spaces
|
|
||||||
|
|
||||||
for (int i = 0; i < 64; i++) rt_buffer2[i] = rt_buffer[i];
|
for (int i = 0; i < 64; i++) rt_buffer2[i] = rt_buffer[i];
|
||||||
}
|
}
|
||||||
@@ -646,7 +645,6 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
RDScharConverter(rt_buffer32, RTtext, sizeof(RTtext) / sizeof(wchar_t), true); // Convert 8 bit ASCII to 16 bit ASCII
|
RDScharConverter(rt_buffer32, RTtext, sizeof(RTtext) / sizeof(wchar_t), true); // Convert 8 bit ASCII to 16 bit ASCII
|
||||||
rds.stationText32 = convertToUTF8(RTtext); // Convert RDS characterset to ASCII
|
rds.stationText32 = convertToUTF8(RTtext); // Convert RDS characterset to ASCII
|
||||||
rds.stationText32 = extractUTF8Substring(rds.stationText32, 0, 32, true); // Make sure RT does not exceed 32 characters
|
rds.stationText32 = extractUTF8Substring(rds.stationText32, 0, 32, true); // Make sure RT does not exceed 32 characters
|
||||||
rds.stationText32 += " "; // Add extra spaces
|
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
|||||||
+47
-22
@@ -179,28 +179,53 @@ static const uint8_t TEFLogo[] PROGMEM = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t RDSLogo[] PROGMEM = {
|
static const uint8_t RDSLogo[] PROGMEM = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00,
|
0x01, 0xfe, 0x0f, 0xf0, 0x00,
|
||||||
0x07, 0xfc, 0x00, 0x1f, 0xe8, 0x00, 0x03, 0xf8, 0x00,
|
0x07, 0x03, 0xb8, 0x1c, 0x00,
|
||||||
0x07, 0xff, 0x00, 0x1f, 0xfc, 0x00, 0x0f, 0xfe, 0x00,
|
0x0c, 0xfc, 0xe7, 0xe6, 0x00,
|
||||||
0x0f, 0xff, 0x80, 0x3f, 0xff, 0x00, 0x1f, 0xfc, 0x00,
|
0x1b, 0x86, 0xdc, 0x3b, 0x00,
|
||||||
0x0f, 0xff, 0xc0, 0x1f, 0xff, 0x00, 0x3f, 0xf8, 0x00,
|
0x36, 0x79, 0xb3, 0xcd, 0x80,
|
||||||
0x0f, 0x8f, 0xc0, 0x3e, 0x3f, 0x80, 0x3e, 0x10, 0x00,
|
0x6d, 0xff, 0x6f, 0xf6, 0xc0,
|
||||||
0x0f, 0x0f, 0x80, 0x3e, 0x0f, 0xc0, 0x3e, 0x00, 0x00,
|
0x5b, 0xfe, 0xdf, 0xfb, 0x40,
|
||||||
0x1f, 0x0f, 0x80, 0x3c, 0x0f, 0x80, 0x7e, 0x00, 0x00,
|
0x57, 0xfe, 0xbf, 0xfd, 0x60,
|
||||||
0x1f, 0x0f, 0x9c, 0x7e, 0x0f, 0xce, 0x7f, 0x80, 0x00,
|
0xd7, 0xfd, 0xbf, 0xfd, 0x60,
|
||||||
0x1f, 0xbf, 0x1e, 0x7c, 0x07, 0xce, 0x3f, 0xf0, 0x00,
|
0xb7, 0xcd, 0x7e, 0x7d, 0xa0,
|
||||||
0x1f, 0xfe, 0x1c, 0x7c, 0x0f, 0x9e, 0x3f, 0xf8, 0x00,
|
0xff, 0x85, 0x7c, 0x3f, 0xe0,
|
||||||
0x1f, 0xfc, 0x1c, 0x7c, 0x0f, 0x9c, 0x1f, 0xf8, 0x00,
|
0xff, 0x85, 0x7c, 0x3f, 0xe0,
|
||||||
0x3f, 0xf0, 0x3c, 0x78, 0x0f, 0x9c, 0x03, 0xf8, 0x00,
|
0xfa, 0x4d, 0x7e, 0x4b, 0xe0,
|
||||||
0x3e, 0xf8, 0x10, 0xf8, 0x1f, 0x14, 0x00, 0xf8, 0x00,
|
0xf9, 0x3b, 0x7f, 0xd3, 0xe0,
|
||||||
0x3e, 0xf8, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x00,
|
0x7d, 0x86, 0xfc, 0x37, 0xc0,
|
||||||
0x3e, 0x7c, 0x00, 0xf8, 0xfe, 0x00, 0xe1, 0xf8, 0x00,
|
0x7e, 0x7d, 0xfb, 0xcf, 0xc0,
|
||||||
0x3c, 0x7e, 0x00, 0xff, 0xfc, 0x00, 0xf7, 0xf0, 0x00,
|
0x7f, 0x03, 0xf8, 0x1f, 0xc0,
|
||||||
0x7c, 0x7e, 0x01, 0xff, 0xf8, 0x01, 0xff, 0xe0, 0x00,
|
0x3f, 0xff, 0xff, 0xff, 0x80,
|
||||||
0x7c, 0x3f, 0x01, 0xff, 0xe0, 0x03, 0xff, 0xe0, 0x00,
|
0x1f, 0xff, 0xff, 0xff, 0x00,
|
||||||
0x7c, 0x3f, 0x01, 0xff, 0x80, 0x00, 0xff, 0x80, 0x00,
|
0x0f, 0xff, 0xff, 0xfe, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
|
0x07, 0xff, 0xbf, 0xfc, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
0x01, 0xfe, 0x0f, 0xf0, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
static const uint8_t Speaker[] PROGMEM = {
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x18, 0x00, 0x00,
|
||||||
|
0x00, 0x38, 0x00, 0x00,
|
||||||
|
0x00, 0xf8, 0x00, 0x00,
|
||||||
|
0x01, 0xf8, 0x00, 0x00,
|
||||||
|
0xff, 0xf8, 0x00, 0x00,
|
||||||
|
0xff, 0xf8, 0x40, 0x80,
|
||||||
|
0xff, 0xf8, 0xe1, 0xc0,
|
||||||
|
0xff, 0xf8, 0x73, 0x80,
|
||||||
|
0xff, 0xf8, 0x3f, 0x00,
|
||||||
|
0xff, 0xf8, 0x1e, 0x00,
|
||||||
|
0xff, 0xf8, 0x1e, 0x00,
|
||||||
|
0xff, 0xf8, 0x3f, 0x00,
|
||||||
|
0xff, 0xf8, 0x73, 0x80,
|
||||||
|
0xff, 0xf8, 0xe1, 0xc0,
|
||||||
|
0xff, 0xf8, 0x40, 0x80,
|
||||||
|
0xff, 0xf8, 0x00, 0x00,
|
||||||
|
0x01, 0xf8, 0x00, 0x00,
|
||||||
|
0x00, 0xf8, 0x00, 0x00,
|
||||||
|
0x00, 0x38, 0x00, 0x00,
|
||||||
|
0x00, 0x18, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t WiFi1[] PROGMEM = {
|
static const uint8_t WiFi1[] PROGMEM = {
|
||||||
|
|||||||
Reference in New Issue
Block a user