Fix idle timer bug that would prevent the screen from waking up.

main
JF 2020-06-13 17:33:49 +07:00
parent 47851fb3b4
commit fab220d0b9
1 changed files with 3 additions and 0 deletions

@ -16,6 +16,8 @@
using namespace Pinetime::System;
void IdleTimerCallback(TimerHandle_t xTimer) {
NRF_LOG_INFO("IdleTimerCallback");
auto sysTask = static_cast<SystemTask *>(pvTimerGetTimerID(xTimer));
sysTask->OnIdle();
}
@ -113,6 +115,7 @@ void SystemTask::Work() {
break;
case Messages::GoToSleep:
NRF_LOG_INFO("[SystemTask] Going to sleep");
xTimerStop(idleTimer, 0);
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::GoToSleep);
isSleeping = true;
break;