diff options
| author | Jean-François Milants <jf@codingfield.com> | 2021-08-28 19:30:31 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2021-08-28 19:30:31 (GMT) |
| commit | 6c023785e53c507f7cb20703f5f3a221ea095068 (patch) | |
| tree | 6a64306e3a011f0e6c36f3debb31b1f7e8f2312a /src/systemtask/SystemTask.cpp | |
| parent | 31bc47d1cb397f5de0275d0d95aac7ca29cc7392 (diff) | |
Fix wake on tap/double tap.
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
| -rw-r--r-- | src/systemtask/SystemTask.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 03bf670..0617b0c 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: |
