From 7066ff5aba3d2643a35ba98379ff24143da99c3c Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Thu, 23 Feb 2023 13:28:04 +0200 Subject: touchhandler: Remove LVGL dependency Move LVGL specific code to the LittleVgl class --- src/displayapp/DisplayApp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/displayapp/DisplayApp.cpp') diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 725caaf4..6a3ca163 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -222,6 +222,7 @@ void DisplayApp::Refresh() { if (state != States::Running) { break; } + lvgl.SetNewTouchPoint(touchHandler.GetX(), touchHandler.GetY(), touchHandler.IsTouching()); auto gesture = touchHandler.GestureGet(); if (gesture == TouchEvents::None) { break; @@ -261,7 +262,7 @@ void DisplayApp::Refresh() { LoadPreviousScreen(); } } else { - touchHandler.CancelTap(); + lvgl.CancelTap(); } } break; case Messages::ButtonPushed: @@ -339,7 +340,7 @@ void DisplayApp::LoadNewScreen(Apps app, DisplayApp::FullRefreshDirections direc } void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections direction) { - touchHandler.CancelTap(); + lvgl.CancelTap(); ApplyBrightness(); currentScreen.reset(nullptr); -- cgit v1.2.3-70-g09d2