mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 02:36:35 +00:00
Merge pull request #14635 from s-hadinger/lvgl_log_was_touched
LVGL log TS when released
This commit is contained in:
commit
2f0036136d
@ -130,6 +130,7 @@ int16_t XPT2046_y() {
|
||||
|
||||
|
||||
void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {
|
||||
static bool was_touched = false; // flag used to log the data sent when the screen was just released
|
||||
|
||||
#ifdef USE_FT5206
|
||||
if (FT5206_found) {
|
||||
@ -154,6 +155,7 @@ void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {
|
||||
raw_touch_xp = touch_xp;
|
||||
raw_touch_yp = touch_yp;
|
||||
if (touched) {
|
||||
was_touched = true;
|
||||
#ifdef USE_TOUCH_BUTTONS
|
||||
#ifdef USE_M5STACK_CORE2
|
||||
// handle 3 built in touch buttons
|
||||
@ -183,6 +185,10 @@ void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {
|
||||
#endif // USE_TOUCH_BUTTONS
|
||||
|
||||
} else {
|
||||
if (was_touched) {
|
||||
AddLog(LOG_LEVEL_DEBUG_MORE, "TS : released x=%i y=%i (raw x=%i y=%i)", touch_xp, touch_yp, raw_touch_xp, raw_touch_yp);
|
||||
was_touched = false;
|
||||
}
|
||||
#ifdef USE_M5STACK_CORE2
|
||||
for (uint32_t tbut = 0; tbut < 3; tbut++) {
|
||||
if (tbstate[tbut] & 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user