Fix idle timer bug that would prevent the screen from waking up.
This commit is contained in:
parent
47851fb3b4
commit
fab220d0b9
|
@ -16,6 +16,8 @@
|
||||||
using namespace Pinetime::System;
|
using namespace Pinetime::System;
|
||||||
|
|
||||||
void IdleTimerCallback(TimerHandle_t xTimer) {
|
void IdleTimerCallback(TimerHandle_t xTimer) {
|
||||||
|
|
||||||
|
NRF_LOG_INFO("IdleTimerCallback");
|
||||||
auto sysTask = static_cast<SystemTask *>(pvTimerGetTimerID(xTimer));
|
auto sysTask = static_cast<SystemTask *>(pvTimerGetTimerID(xTimer));
|
||||||
sysTask->OnIdle();
|
sysTask->OnIdle();
|
||||||
}
|
}
|
||||||
|
@ -113,6 +115,7 @@ void SystemTask::Work() {
|
||||||
break;
|
break;
|
||||||
case Messages::GoToSleep:
|
case Messages::GoToSleep:
|
||||||
NRF_LOG_INFO("[SystemTask] Going to sleep");
|
NRF_LOG_INFO("[SystemTask] Going to sleep");
|
||||||
|
xTimerStop(idleTimer, 0);
|
||||||
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::GoToSleep);
|
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::GoToSleep);
|
||||||
isSleeping = true;
|
isSleeping = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user