mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-08-16 00:50:22 +03:00
Power optimization - Increase SystemTask Period
Increase the SystemTask period also when the notification mode is set to Sleep (as it also disables the motion-based wake options).
This commit is contained in:
parent
491d3ae20f
commit
6e03b47eb3
@ -509,8 +509,9 @@ TickType_t SystemTask::GetQueueTimeout() const {
|
||||
// By default, the timeout on the queue is 100ms.
|
||||
// It's extended to 4s in sleep mode, when no motion based wake up option is enabled.
|
||||
TickType_t timeout = pdMS_TO_TICKS(100);
|
||||
if (state == SystemTaskState::Sleeping && !settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
||||
!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)) {
|
||||
if (state == SystemTaskState::Sleeping && ((!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
||||
!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)) ||
|
||||
settingsController.GetNotificationStatus() == Controllers::Settings::Notification::Sleep)) {
|
||||
timeout = pdMS_TO_TICKS(4000);
|
||||
}
|
||||
return timeout;
|
||||
|
Loading…
Reference in New Issue
Block a user