summaryrefslogtreecommitdiff
path: root/src/systemtask
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-08-28 21:30:31 +0200
committerJean-François Milants <jf@codingfield.com>2021-08-28 21:30:31 +0200
commit6c023785e53c507f7cb20703f5f3a221ea095068 (patch)
tree6a64306e3a011f0e6c36f3debb31b1f7e8f2312a /src/systemtask
parent31bc47d1cb397f5de0275d0d95aac7ca29cc7392 (diff)
Fix wake on tap/double tap.
Diffstat (limited to 'src/systemtask')
-rw-r--r--src/systemtask/SystemTask.cpp14
1 files changed, 8 insertions, 6 deletions
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: