From 6c023785e53c507f7cb20703f5f3a221ea095068 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 28 Aug 2021 21:30:31 +0200 Subject: Fix wake on tap/double tap. --- src/systemtask/SystemTask.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/systemtask') diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 03bf6706..0617b0ce 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -240,12 +240,14 @@ void SystemTask::Work() { isDimmed = false; break; case Messages::TouchWakeUp: { - auto touchInfo = touchPanel.GetTouchInfo(); - if (touchInfo.touching and ((touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and - settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or - (touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and - settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) { - GoToRunning(); + if(touchHandler.GetNewTouchInfo()) { + auto gesture = touchHandler.GestureGet(); + if (gesture != Pinetime::Drivers::Cst816S::Gestures::None and ((gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and + settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or + (gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and + settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) { + GoToRunning(); + } } } break; case Messages::GoToSleep: -- cgit v1.2.3