Fix wake on tap/double tap.
This commit is contained in:
parent
31bc47d1cb
commit
6c023785e5
|
@ -240,13 +240,15 @@ 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();
|
||||||
|
if (gesture != Pinetime::Drivers::Cst816S::Gestures::None and ((gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
|
||||||
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
|
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
|
||||||
(touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
|
(gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
|
||||||
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {
|
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {
|
||||||
GoToRunning();
|
GoToRunning();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
case Messages::GoToSleep:
|
case Messages::GoToSleep:
|
||||||
isGoingToSleep = true;
|
isGoingToSleep = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user