mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
Merge pull request #14608 from s-hadinger/lvgl_fix_ts
Update touchscreen x/y only when touched
This commit is contained in:
commit
6a9d0847a3
@ -133,17 +133,21 @@ void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {
|
|||||||
|
|
||||||
#ifdef USE_FT5206
|
#ifdef USE_FT5206
|
||||||
if (FT5206_found) {
|
if (FT5206_found) {
|
||||||
touch_xp = FT5206_x();
|
|
||||||
touch_yp = FT5206_y();
|
|
||||||
touched = FT5206_touched();
|
touched = FT5206_touched();
|
||||||
|
if (touched) {
|
||||||
|
touch_xp = FT5206_x();
|
||||||
|
touch_yp = FT5206_y();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif // USE_FT5206
|
#endif // USE_FT5206
|
||||||
|
|
||||||
#ifdef USE_XPT2046
|
#ifdef USE_XPT2046
|
||||||
if (XPT2046_found) {
|
if (XPT2046_found) {
|
||||||
touch_xp = XPT2046_x();
|
|
||||||
touch_yp = XPT2046_y();
|
|
||||||
touched = XPT2046_touched();
|
touched = XPT2046_touched();
|
||||||
|
if (touched) {
|
||||||
|
touch_xp = XPT2046_x();
|
||||||
|
touch_yp = XPT2046_y();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif // USE_XPT2046
|
#endif // USE_XPT2046
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user