Small speed improvements

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-02-03 18:38:50 +01:00
parent 5650864dd9
commit 892cb28860
5 changed files with 21 additions and 10 deletions

View File

@@ -284,6 +284,8 @@ String salt;
String saltkey = " ";
String stationIDold;
String stationStateold;
String StereoStatusCommand;
String StereoStatusCommandold;
String SWMIBandstring = String();
String SWMIBandstringold = String();
String XDRGTK_key;
@@ -348,6 +350,7 @@ unsigned long rtplusticker;
unsigned long rtplustickerhold;
unsigned long rtticker;
unsigned long rttickerhold;
unsigned long signalstatustimer;
unsigned long tottimer;
unsigned long tuningtimer;
unsigned long udptimer;

View File

@@ -167,6 +167,7 @@ void Tuner_Patch(byte TEF) {
void Tuner_I2C_Init() {
Wire.begin();
Wire.setClock(400000);
delay(5);
}

View File

@@ -568,18 +568,22 @@ void XDRGTKRoutine() {
XDRGTKdata = false;
}
if (band > BAND_GAP) {
DataPrint("Sm");
} else {
if (!StereoToggle) {
DataPrint("SS");
} else if (Stereostatus) {
DataPrint("Ss");
} else {
if (millis() >= signalstatustimer + 66) {
if (band > BAND_GAP) {
DataPrint("Sm");
} else {
if (!StereoToggle) {
DataPrint("SS");
} else if (Stereostatus) {
DataPrint("Ss");
} else {
DataPrint("Sm");
}
}
DataPrint(String(((SStatus * 100) + 10875) / 1000) + "." + String(((SStatus * 100) + 10875) / 100 % 10) + "," + String(WAM / 10) + "," + String(CN) + "," + String(BW) + "\n\n");
signalstatustimer = millis();
}
DataPrint(String(((SStatus * 100) + 10875) / 1000) + "." + String(((SStatus * 100) + 10875) / 100 % 10) + "," + String(WAM / 10) + "," + String(CN) + "," + String(BW) + "\n\n");
}
void passwordcrypt() {

View File

@@ -75,6 +75,8 @@ extern IPAddress remoteip;
extern String cryptedpassword;
extern String salt;
extern String saltkey;
extern String StereoStatusCommand;
extern String StereoStatusCommandold;
extern String XDRGTK_key;
extern uint16_t BW;
extern uint16_t MStatus;
@@ -101,6 +103,7 @@ extern unsigned int scanner_step;
extern unsigned int SWHighEdgeSet;
extern unsigned int SWLowEdgeSet;
extern unsigned long aftimer;
extern unsigned long signalstatustimer;
extern TFT_eSPI tft;
extern TEF6686 radio;

View File

@@ -288,8 +288,8 @@ void showECC() {
}
void readRds() {
radio.readRDS(showrdserrors);
if (band < BAND_GAP) {
radio.readRDS(showrdserrors);
RDSstatus = radio.rds.hasRDS;
ShowRDSLogo(RDSstatus);
if (!screenmute && !afscreen) {