aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/LittleVgl.cpp
diff options
context:
space:
mode:
authormark9064 <30447455+mark9064@users.noreply.github.com>2024-08-22 16:53:18 +0100
committerJF <JF002@users.noreply.github.com>2024-10-27 19:51:01 +0100
commit1808634f0e041ed1c85b69a967207c2cff812d81 (patch)
treefe0c6f7ea9948855446f890359972e4ac636b166 /src/displayapp/LittleVgl.cpp
parentcfaad261dc0b8b1af0a8b33d8289782be2c4e57a (diff)
Clear ongoing taps when going to sleep
Diffstat (limited to 'src/displayapp/LittleVgl.cpp')
-rw-r--r--src/displayapp/LittleVgl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/displayapp/LittleVgl.cpp b/src/displayapp/LittleVgl.cpp
index c70a0856..c6f6f784 100644
--- a/src/displayapp/LittleVgl.cpp
+++ b/src/displayapp/LittleVgl.cpp
@@ -248,6 +248,8 @@ void LittleVgl::SetNewTouchPoint(int16_t x, int16_t y, bool contact) {
}
}
+// Cancel an ongoing tap
+// Signifies that LVGL should not handle the current tap
void LittleVgl::CancelTap() {
if (tapped) {
isCancelled = true;
@@ -255,6 +257,13 @@ void LittleVgl::CancelTap() {
}
}
+// Clear the current tapped state
+// Signifies that touch input processing is suspended
+void LittleVgl::ClearTouchState() {
+ touchPoint = {-1, -1};
+ tapped = false;
+}
+
bool LittleVgl::GetTouchPadInfo(lv_indev_data_t* ptr) {
ptr->point.x = touchPoint.x;
ptr->point.y = touchPoint.y;