Fixed compiler error when using original tft_espi library
This commit is contained in:
@@ -591,6 +591,7 @@ void setup() {
|
|||||||
clockampm = EEPROM.readByte(EE_BYTE_CLOCKAMPM);
|
clockampm = EEPROM.readByte(EE_BYTE_CLOCKAMPM);
|
||||||
logcounter = EEPROM.readUInt(EE_UINT16_LOGCOUNTER);
|
logcounter = EEPROM.readUInt(EE_UINT16_LOGCOUNTER);
|
||||||
|
|
||||||
|
#ifdef DYNAMIC_SPI_SPEED
|
||||||
if (spispeed == SPI_SPEED_DEFAULT) {
|
if (spispeed == SPI_SPEED_DEFAULT) {
|
||||||
tft.setSPISpeed(SPI_FREQUENCY / 1000000);
|
tft.setSPISpeed(SPI_FREQUENCY / 1000000);
|
||||||
} else if (spispeed == 7) {
|
} else if (spispeed == 7) {
|
||||||
@@ -598,6 +599,7 @@ void setup() {
|
|||||||
} else {
|
} else {
|
||||||
tft.setSPISpeed(spispeed * 10);
|
tft.setSPISpeed(spispeed * 10);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
LWLowEdgeSet = FREQ_LW_LOW_EDGE_MIN;
|
LWLowEdgeSet = FREQ_LW_LOW_EDGE_MIN;
|
||||||
LWHighEdgeSet = FREQ_LW_HIGH_EDGE_MAX;
|
LWHighEdgeSet = FREQ_LW_HIGH_EDGE_MAX;
|
||||||
@@ -2546,7 +2548,9 @@ void ModeButtonPress() {
|
|||||||
menuoption = ITEM1;
|
menuoption = ITEM1;
|
||||||
menupage = INDEX;
|
menupage = INDEX;
|
||||||
menuitem = 0;
|
menuitem = 0;
|
||||||
|
#ifdef DYNAMIC_SPI_SPEED
|
||||||
if (spispeed == 7) tft.setSPISpeed(40);
|
if (spispeed == 7) tft.setSPISpeed(40);
|
||||||
|
#endif
|
||||||
PSSprite.unloadFont();
|
PSSprite.unloadFont();
|
||||||
if (language == LANGUAGE_CHS) PSSprite.loadFont(FONT16_CHS); else PSSprite.loadFont(FONT16);
|
if (language == LANGUAGE_CHS) PSSprite.loadFont(FONT16_CHS); else PSSprite.loadFont(FONT16);
|
||||||
BuildMenu();
|
BuildMenu();
|
||||||
@@ -3009,7 +3013,9 @@ void ShowMemoryPos() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DoMemoryPosTune() {
|
void DoMemoryPosTune() {
|
||||||
|
#ifdef DYNAMIC_SPI_SPEED
|
||||||
if (spispeed == 7) tft.setSPISpeed(50);
|
if (spispeed == 7) tft.setSPISpeed(50);
|
||||||
|
#endif
|
||||||
radio.clearRDS(fullsearchrds);
|
radio.clearRDS(fullsearchrds);
|
||||||
|
|
||||||
// Process empty stations
|
// Process empty stations
|
||||||
@@ -4921,6 +4927,7 @@ void rabbitearssend () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setAutoSpeedSPI() {
|
void setAutoSpeedSPI() {
|
||||||
|
#ifdef DYNAMIC_SPI_SPEED
|
||||||
switch (frequency / 10) {
|
switch (frequency / 10) {
|
||||||
case 875 ... 877: tft.setSPISpeed(28); break;
|
case 875 ... 877: tft.setSPISpeed(28); break;
|
||||||
case 878 ... 881: tft.setSPISpeed(24); break;
|
case 878 ... 881: tft.setSPISpeed(24); break;
|
||||||
@@ -4965,6 +4972,7 @@ void setAutoSpeedSPI() {
|
|||||||
case 1076 ... 1080: tft.setSPISpeed(15); break;
|
case 1076 ... 1080: tft.setSPISpeed(15); break;
|
||||||
default: tft.setSPISpeed(30); break;
|
default: tft.setSPISpeed(30); break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, uint8_t stopmem, bool rdsonly, uint8_t doublepi) {
|
uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, uint8_t stopmem, bool rdsonly, uint8_t doublepi) {
|
||||||
@@ -5298,7 +5306,9 @@ void NumpadProcess(int num) {
|
|||||||
menuoption = ITEM1;
|
menuoption = ITEM1;
|
||||||
menupage = DXMODE;
|
menupage = DXMODE;
|
||||||
menuitem = 0;
|
menuitem = 0;
|
||||||
|
#ifdef DYNAMIC_SPI_SPEED
|
||||||
if (spispeed == 7) tft.setSPISpeed(40);
|
if (spispeed == 7) tft.setSPISpeed(40);
|
||||||
|
#endif
|
||||||
submenu = true;
|
submenu = true;
|
||||||
menu = true;
|
menu = true;
|
||||||
PSSprite.unloadFont();
|
PSSprite.unloadFont();
|
||||||
|
|||||||
+4
-3
@@ -3223,7 +3223,7 @@ void MenuUp() {
|
|||||||
OneBigLineSprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 160, 0);
|
OneBigLineSprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 160, 0);
|
||||||
}
|
}
|
||||||
OneBigLineSprite.pushSprite(24, 118);
|
OneBigLineSprite.pushSprite(24, 118);
|
||||||
|
#ifdef DYNAMIC_SPI_SPEED
|
||||||
if (spispeed == SPI_SPEED_DEFAULT) {
|
if (spispeed == SPI_SPEED_DEFAULT) {
|
||||||
tft.setSPISpeed(SPI_FREQUENCY / 1000000);
|
tft.setSPISpeed(SPI_FREQUENCY / 1000000);
|
||||||
} else if (spispeed == 7) {
|
} else if (spispeed == 7) {
|
||||||
@@ -3231,6 +3231,7 @@ void MenuUp() {
|
|||||||
} else {
|
} else {
|
||||||
tft.setSPISpeed(spispeed * 10);
|
tft.setSPISpeed(spispeed * 10);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -4206,7 +4207,7 @@ void MenuDown() {
|
|||||||
OneBigLineSprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 160, 0);
|
OneBigLineSprite.drawString((spispeed == SPI_SPEED_DEFAULT ? String(myLanguage[language][204]) + " " + String(SPI_FREQUENCY / 1000000, DEC) : String(spispeed * 10, DEC)), 160, 0);
|
||||||
}
|
}
|
||||||
OneBigLineSprite.pushSprite(24, 118);
|
OneBigLineSprite.pushSprite(24, 118);
|
||||||
|
#ifdef DYNAMIC_SPI_SPEED
|
||||||
if (spispeed == SPI_SPEED_DEFAULT) {
|
if (spispeed == SPI_SPEED_DEFAULT) {
|
||||||
tft.setSPISpeed(SPI_FREQUENCY / 1000000);
|
tft.setSPISpeed(SPI_FREQUENCY / 1000000);
|
||||||
} else if (spispeed == 7) {
|
} else if (spispeed == 7) {
|
||||||
@@ -4214,8 +4215,8 @@ void MenuDown() {
|
|||||||
} else {
|
} else {
|
||||||
tft.setSPISpeed(spispeed * 10);
|
tft.setSPISpeed(spispeed * 10);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user