aboutsummaryrefslogtreecommitdiffstats
path: root/src/touchhandler/TouchHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/touchhandler/TouchHandler.cpp')
-rw-r--r--src/touchhandler/TouchHandler.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/touchhandler/TouchHandler.cpp b/src/touchhandler/TouchHandler.cpp
index d98d2577..b29f951f 100644
--- a/src/touchhandler/TouchHandler.cpp
+++ b/src/touchhandler/TouchHandler.cpp
@@ -27,18 +27,13 @@ namespace {
}
}
-TouchHandler::TouchHandler(Drivers::Cst816S& touchPanel) : touchPanel {touchPanel} {
-}
-
Pinetime::Applications::TouchEvents TouchHandler::GestureGet() {
auto returnGesture = gesture;
gesture = Pinetime::Applications::TouchEvents::None;
return returnGesture;
}
-bool TouchHandler::GetNewTouchInfo() {
- info = touchPanel.GetTouchInfo();
-
+bool TouchHandler::ProcessTouchInfo(Drivers::Cst816S::TouchInfos info) {
if (!info.isValid) {
return false;
}
@@ -65,5 +60,7 @@ bool TouchHandler::GetNewTouchInfo() {
gestureReleased = true;
}
+ currentTouchPoint = {info.x, info.y, info.touching};
+
return true;
}