‎2021-04-27 02:55 AM
Hello,
I can run the GUI on the screen, however, for some unknown reason, the touch does not respond. I have tested the touch function separately in the while loop and it handles the x and y coordinates correctly with the same code and with checking the touch press (I mean what you see below inside sampleTouch, just without "return true", because return true will exit the while loop).
Where is your definition of (0, 0), upper-left corner, or lower-left corner? I have tested both. nothing happens :(
This is my implementation inside "STM32TouchController.cpp":
bool STM32TouchController::sampleTouch(int32_t &x, int32_t &y) {
if (XPT2046_TouchPressed()) {
XPT2046_TouchGetCoordinates((uint16_t*) &x, (uint16_t*) &y);
return true;
}
return false;
}
Solved! Go to Solution.
‎2021-05-25 05:47 AM
Good to hear you found the problem :thumbs_up:
‎2021-05-25 06:00 AM
Yes, thank you for your testing and support.
I had a doubt about a bug from the beginning, that why I mentioned a "possible" bug in touchgx ...
;)