Update touch events

This commit is contained in:
Sjef Verhoeven PE5PVB
2025-01-07 13:30:28 +01:00
parent 7d0d22c60a
commit 1383d80626
2 changed files with 30 additions and 3 deletions

View File

@@ -154,9 +154,16 @@ void doTouchEvent(uint16_t x, uint16_t y) {
bwtouchtune = true;
BWset = BWtemp;
doBW();
BuildDisplay();
SelectBand();
BWtune = false;
bwtouchtune = false;
if (advancedRDS) {
BuildAdvancedRDS();
} else if (afscreen) {
BuildAFScreen();
} else {
BuildDisplay();
SelectBand();
}
} else {
bwtouchtune = true;
BWset = BWtemp;
@@ -184,12 +191,28 @@ void doTouchEvent(uint16_t x, uint16_t y) {
}
if (!BWtune && !menu && advancedRDS && !seek && !afscreen) { // Advanced RDS mode
if (x > 0 && x < 320 && y > 180 && y < 240) { // -----------------
if (x > 0 && x < 320 && y > 120 && y < 170) { // -----------------
leave = true;
BuildDisplay();
SelectBand();
ScreensaverTimerReopen(); // Switch to normal radio view
return;
} else if (x > 0 && x < 320 && y > 180 && y < 240) {
BuildAFScreen();
return;
}
}
if (!BWtune && !menu && !advancedRDS && !seek && afscreen) {
if (x > 0 && x < 320 && y > 100 && y < 170) {
if (afpagenr == 1) afpagenr = 2; else if (afpagenr == 2 && afpage) afpagenr = 3; else afpagenr = 1;
BuildAFScreen();
return;
}
if (x > 0 && x < 320 && y > 180 && y < 240) {
leave = true;
BuildAdvancedRDS();
return;
}
}
}

View File

@@ -9,6 +9,7 @@ extern TFT_eSPI tft;
extern TEF6686 radio;
extern bool advancedRDS;
extern bool afpage;
extern bool afscreen;
extern bool bwtouchtune;
extern bool BWtune;
@@ -19,6 +20,7 @@ extern bool scandxmode;
extern bool seek;
extern bool XDRGTKTCP;
extern bool XDRGTKUSB;
extern byte afpagenr;
extern byte band;
extern byte BWset;
extern byte BWtemp;
@@ -53,4 +55,6 @@ extern void showBWSelector();
extern void updateiMS();
extern void updateEQ();
extern void DataPrint(String string);
extern void BuildAFScreen();
#endif