1
0
Fork 0

Fix wake on tap/double tap.

This commit is contained in:
Jean-François Milants 2021-08-28 21:30:31 +02:00
parent 31bc47d1cb
commit 6c023785e5

View file

@ -240,12 +240,14 @@ void SystemTask::Work() {
isDimmed = false; isDimmed = false;
break; break;
case Messages::TouchWakeUp: { case Messages::TouchWakeUp: {
auto touchInfo = touchPanel.GetTouchInfo(); if(touchHandler.GetNewTouchInfo()) {
if (touchInfo.touching and ((touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and auto gesture = touchHandler.GestureGet();
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or if (gesture != Pinetime::Drivers::Cst816S::Gestures::None and ((gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
(touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) { (gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
GoToRunning(); settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {
GoToRunning();
}
} }
} break; } break;
case Messages::GoToSleep: case Messages::GoToSleep: