lowersleep: Implement Lower to Sleep functionality (#827)

This commit is contained in:
FintasticMan 2023-08-27 18:15:21 +02:00 committed by GitHub
parent 2b1eae7f59
commit 0f9f606b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 13 deletions

View file

@ -436,6 +436,10 @@ void SystemTask::UpdateMotion() {
GoToRunning();
}
}
if (settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::LowerWrist) && state == SystemTaskState::Running &&
motionController.ShouldLowerSleep()) {
PushMessage(Messages::GoToSleep);
}
}
void SystemTask::HandleButtonAction(Controllers::ButtonActions action) {