You've already forked TEF6686_ESP32
Added iMQ/EQ toggle via touchscreen
This commit is contained in:
@@ -2723,55 +2723,7 @@ void ButtonPress() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (band < BAND_GAP) {
|
toggleiMSEQ();
|
||||||
if (iMSEQ == 0) iMSEQ = 1;
|
|
||||||
|
|
||||||
if (iMSEQ == 4) {
|
|
||||||
iMSset = 0;
|
|
||||||
EQset = 0;
|
|
||||||
updateiMS();
|
|
||||||
updateEQ();
|
|
||||||
iMSEQ = 0;
|
|
||||||
}
|
|
||||||
if (iMSEQ == 3) {
|
|
||||||
iMSset = 1;
|
|
||||||
EQset = 0;
|
|
||||||
updateiMS();
|
|
||||||
updateEQ();
|
|
||||||
iMSEQ = 4;
|
|
||||||
}
|
|
||||||
if (iMSEQ == 2) {
|
|
||||||
iMSset = 0;
|
|
||||||
EQset = 1;
|
|
||||||
updateiMS();
|
|
||||||
updateEQ();
|
|
||||||
iMSEQ = 3;
|
|
||||||
}
|
|
||||||
if (iMSEQ == 1) {
|
|
||||||
iMSset = 1;
|
|
||||||
EQset = 1;
|
|
||||||
updateiMS();
|
|
||||||
updateEQ();
|
|
||||||
iMSEQ = 2;
|
|
||||||
}
|
|
||||||
EEPROM.writeByte(EE_BYTE_IMSSET, iMSset);
|
|
||||||
EEPROM.writeByte(EE_BYTE_EQSET, EQset);
|
|
||||||
EEPROM.commit();
|
|
||||||
if (XDRGTKUSB || XDRGTKTCP) DataPrint("G" + String(!EQset) + String(!iMSset) + "\n");
|
|
||||||
} else {
|
|
||||||
if (band == BAND_SW && tunemode != TUNE_MEM) {
|
|
||||||
nowToggleSWMIBand = !nowToggleSWMIBand;
|
|
||||||
tunemode = TUNE_MAN;
|
|
||||||
EEPROM.writeByte(EE_BYTE_BANDAUTOSW, nowToggleSWMIBand);
|
|
||||||
EEPROM.commit();
|
|
||||||
if (!screenmute) {
|
|
||||||
tftPrint(0, "AUTO", 22, 60, BackgroundColor, BackgroundColor, 16);
|
|
||||||
tftPrint(0, "BAND", 22, 60, BackgroundColor, BackgroundColor, 16);
|
|
||||||
}
|
|
||||||
doTuneMode();
|
|
||||||
ShowTuneMode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (screensaverset) {
|
if (screensaverset) {
|
||||||
@@ -5269,3 +5221,55 @@ void NumpadProcess(int num) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void toggleiMSEQ() {
|
||||||
|
if (band < BAND_GAP) {
|
||||||
|
if (iMSEQ == 0) iMSEQ = 1;
|
||||||
|
|
||||||
|
if (iMSEQ == 4) {
|
||||||
|
iMSset = 0;
|
||||||
|
EQset = 0;
|
||||||
|
updateiMS();
|
||||||
|
updateEQ();
|
||||||
|
iMSEQ = 0;
|
||||||
|
}
|
||||||
|
if (iMSEQ == 3) {
|
||||||
|
iMSset = 1;
|
||||||
|
EQset = 0;
|
||||||
|
updateiMS();
|
||||||
|
updateEQ();
|
||||||
|
iMSEQ = 4;
|
||||||
|
}
|
||||||
|
if (iMSEQ == 2) {
|
||||||
|
iMSset = 0;
|
||||||
|
EQset = 1;
|
||||||
|
updateiMS();
|
||||||
|
updateEQ();
|
||||||
|
iMSEQ = 3;
|
||||||
|
}
|
||||||
|
if (iMSEQ == 1) {
|
||||||
|
iMSset = 1;
|
||||||
|
EQset = 1;
|
||||||
|
updateiMS();
|
||||||
|
updateEQ();
|
||||||
|
iMSEQ = 2;
|
||||||
|
}
|
||||||
|
EEPROM.writeByte(EE_BYTE_IMSSET, iMSset);
|
||||||
|
EEPROM.writeByte(EE_BYTE_EQSET, EQset);
|
||||||
|
EEPROM.commit();
|
||||||
|
if (XDRGTKUSB || XDRGTKTCP) DataPrint("G" + String(!EQset) + String(!iMSset) + "\n");
|
||||||
|
} else {
|
||||||
|
if (band == BAND_SW && tunemode != TUNE_MEM) {
|
||||||
|
nowToggleSWMIBand = !nowToggleSWMIBand;
|
||||||
|
tunemode = TUNE_MAN;
|
||||||
|
EEPROM.writeByte(EE_BYTE_BANDAUTOSW, nowToggleSWMIBand);
|
||||||
|
EEPROM.commit();
|
||||||
|
if (!screenmute) {
|
||||||
|
tftPrint(0, "AUTO", 22, 60, BackgroundColor, BackgroundColor, 16);
|
||||||
|
tftPrint(0, "BAND", 22, 60, BackgroundColor, BackgroundColor, 16);
|
||||||
|
}
|
||||||
|
doTuneMode();
|
||||||
|
ShowTuneMode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -165,6 +165,8 @@ void doTouchEvent(uint16_t x, uint16_t y) {
|
|||||||
} else if (x > 0 && x < 30 && y > 25 && y < 90) {
|
} else if (x > 0 && x < 30 && y > 25 && y < 90) {
|
||||||
doTuneMode(); // Toggle tune mode
|
doTuneMode(); // Toggle tune mode
|
||||||
return;
|
return;
|
||||||
|
} else if (x > 250 && x < 320 && y > 50 && y < 80) {
|
||||||
|
toggleiMSEQ(); // Toggle iMQ/EQ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,4 +41,5 @@ extern void KeyUp();
|
|||||||
extern void ButtonPress();
|
extern void ButtonPress();
|
||||||
extern void DoMenu();
|
extern void DoMenu();
|
||||||
extern void ModeButtonPress();
|
extern void ModeButtonPress();
|
||||||
|
extern void toggleiMSEQ();
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user