Skip to content

Commit 6c02378

Browse files
committed
Fix wake on tap/double tap.
1 parent 31bc47d commit 6c02378

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/systemtask/SystemTask.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,14 @@ void SystemTask::Work() {
240240
isDimmed = false;
241241
break;
242242
case Messages::TouchWakeUp: {
243-
auto touchInfo = touchPanel.GetTouchInfo();
244-
if (touchInfo.touching and ((touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
245-
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
246-
(touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
247-
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {
248-
GoToRunning();
243+
if(touchHandler.GetNewTouchInfo()) {
244+
auto gesture = touchHandler.GestureGet();
245+
if (gesture != Pinetime::Drivers::Cst816S::Gestures::None and ((gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
246+
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
247+
(gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
248+
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {
249+
GoToRunning();
250+
}
249251
}
250252
} break;
251253
case Messages::GoToSleep:

0 commit comments

Comments
 (0)