mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02: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.
|
// 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.
|
// It's extended to 4s in sleep mode, when no motion based wake up option is enabled.
|
||||||
TickType_t timeout = pdMS_TO_TICKS(100);
|
TickType_t timeout = pdMS_TO_TICKS(100);
|
||||||
if (state == SystemTaskState::Sleeping && !settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
if (state == SystemTaskState::Sleeping && ((!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
||||||
!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)) {
|
!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)) ||
|
||||||
|
settingsController.GetNotificationStatus() == Controllers::Settings::Notification::Sleep)) {
|
||||||
timeout = pdMS_TO_TICKS(4000);
|
timeout = pdMS_TO_TICKS(4000);
|
||||||
}
|
}
|
||||||
return timeout;
|
return timeout;
|
||||||
|
|
Loading…
Reference in a new issue