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

This commit is contained in:
JF 2020-06-13 17:33:49 +02:00
parent 47851fb3b4
commit fab220d0b9

View File

@ -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;