Make textlines 1, 3, 4, 6, 7, 66, 282, 284 \n compatible
This commit is contained in:
+9
-9
@@ -730,7 +730,7 @@ void setup() {
|
|||||||
EEPROM.writeByte(EE_BYTE_ROTARYMODE, rotarymode);
|
EEPROM.writeByte(EE_BYTE_ROTARYMODE, rotarymode);
|
||||||
EEPROM.commit();
|
EEPROM.commit();
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
||||||
tftPrint(0, myLanguage[language][1], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][1]);
|
||||||
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
while (digitalRead(BWBUTTON) == LOW) delay(50);
|
while (digitalRead(BWBUTTON) == LOW) delay(50);
|
||||||
}
|
}
|
||||||
@@ -754,7 +754,7 @@ void setup() {
|
|||||||
EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, displayflip);
|
EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, displayflip);
|
||||||
EEPROM.commit();
|
EEPROM.commit();
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
||||||
tftPrint(0, myLanguage[language][3], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][3]);
|
||||||
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
while (digitalRead(MODEBUTTON) == LOW) delay(50);
|
while (digitalRead(MODEBUTTON) == LOW) delay(50);
|
||||||
}
|
}
|
||||||
@@ -762,7 +762,7 @@ void setup() {
|
|||||||
if (digitalRead(BWBUTTON) == HIGH && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
if (digitalRead(BWBUTTON) == HIGH && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
||||||
analogWrite(SMETERPIN, 511);
|
analogWrite(SMETERPIN, 511);
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
||||||
tftPrint(0, myLanguage[language][4], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][4]);
|
||||||
tftPrint(0, myLanguage[language][5], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, myLanguage[language][5], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
while (digitalRead(BANDBUTTON) == LOW) delay(50);
|
while (digitalRead(BANDBUTTON) == LOW) delay(50);
|
||||||
analogWrite(SMETERPIN, 0);
|
analogWrite(SMETERPIN, 0);
|
||||||
@@ -772,10 +772,10 @@ void setup() {
|
|||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
||||||
if (optenc == 0) {
|
if (optenc == 0) {
|
||||||
optenc = 1;
|
optenc = 1;
|
||||||
tftPrint(0, myLanguage[language][6], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][6]);
|
||||||
} else {
|
} else {
|
||||||
optenc = 0;
|
optenc = 0;
|
||||||
tftPrint(0, myLanguage[language][7], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][7]);
|
||||||
}
|
}
|
||||||
EEPROM.writeByte(EE_BYTE_OPTENC, optenc);
|
EEPROM.writeByte(EE_BYTE_OPTENC, optenc);
|
||||||
EEPROM.commit();
|
EEPROM.commit();
|
||||||
@@ -786,7 +786,7 @@ void setup() {
|
|||||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == LOW && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == HIGH) {
|
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == LOW && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == HIGH) {
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
||||||
DefaultSettings();
|
DefaultSettings();
|
||||||
tftPrint(0, myLanguage[language][66], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][66]);
|
||||||
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
while (digitalRead(ROTARY_BUTTON) == LOW && digitalRead(BWBUTTON) == LOW) delay(50);
|
while (digitalRead(ROTARY_BUTTON) == LOW && digitalRead(BWBUTTON) == LOW) delay(50);
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
@@ -794,8 +794,8 @@ void setup() {
|
|||||||
|
|
||||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == LOW && digitalRead(BANDBUTTON) == HIGH) {
|
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == LOW && digitalRead(BANDBUTTON) == HIGH) {
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
||||||
tftPrint(0, myLanguage[language][282], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][282]);
|
||||||
tftPrint(0, myLanguage[language][283], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, myLanguage[language][283], 155, 100, ActiveColor, ActiveColorSmooth, 28);
|
||||||
tft.calibrateTouch(TouchCalData, PrimaryColor, BackgroundColor, 30);
|
tft.calibrateTouch(TouchCalData, PrimaryColor, BackgroundColor, 30);
|
||||||
EEPROM.writeUInt(EE_UINT16_CALTOUCH1, TouchCalData[0]);
|
EEPROM.writeUInt(EE_UINT16_CALTOUCH1, TouchCalData[0]);
|
||||||
EEPROM.writeUInt(EE_UINT16_CALTOUCH2, TouchCalData[1]);
|
EEPROM.writeUInt(EE_UINT16_CALTOUCH2, TouchCalData[1]);
|
||||||
@@ -807,7 +807,7 @@ void setup() {
|
|||||||
|
|
||||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
||||||
tftPrint(0, myLanguage[language][284], 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
Infoboxprint(myLanguage[language][284]);
|
||||||
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, myLanguage[language][2], 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
invertdisplay = !invertdisplay;
|
invertdisplay = !invertdisplay;
|
||||||
tft.invertDisplay(!invertdisplay);
|
tft.invertDisplay(!invertdisplay);
|
||||||
|
|||||||
@@ -5545,6 +5545,9 @@ void Infoboxprint(const char* input) {
|
|||||||
if (menu) {
|
if (menu) {
|
||||||
tftPrint(0, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, line1, 155, 48, ActiveColor, ActiveColorSmooth, 28);
|
||||||
tftPrint(0, line2, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, line2, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||||
|
} else if (setupmode) {
|
||||||
|
tftPrint(0, line1, 155, 40, ActiveColor, ActiveColorSmooth, 28);
|
||||||
|
tftPrint(0, line2, 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
||||||
} else {
|
} else {
|
||||||
FrequencySprite.drawString(line1, 100, 5);
|
FrequencySprite.drawString(line1, 100, 5);
|
||||||
FrequencySprite.drawString(line2, 100, 25);
|
FrequencySprite.drawString(line2, 100, 25);
|
||||||
@@ -5554,6 +5557,8 @@ void Infoboxprint(const char* input) {
|
|||||||
} else {
|
} else {
|
||||||
if (menu) {
|
if (menu) {
|
||||||
tftPrint(0, input, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, input, 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||||
|
} else if (setupmode) {
|
||||||
|
tftPrint(0, input, 155, 70, ActiveColor, ActiveColorSmooth, 28);
|
||||||
} else {
|
} else {
|
||||||
FrequencySprite.drawString(input, 100, 15);
|
FrequencySprite.drawString(input, 100, 15);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ extern bool scandxmode;
|
|||||||
extern bool scanholdonsignal;
|
extern bool scanholdonsignal;
|
||||||
extern bool scanmem;
|
extern bool scanmem;
|
||||||
extern bool scanmute;
|
extern bool scanmute;
|
||||||
|
extern bool setupmode;
|
||||||
extern bool showclock;
|
extern bool showclock;
|
||||||
extern bool showlongps;
|
extern bool showlongps;
|
||||||
extern bool softmuteam;
|
extern bool softmuteam;
|
||||||
|
|||||||
Reference in New Issue
Block a user