diff options
author | Riku Isokoski <riksu9000@gmail.com> | 2021-10-25 17:13:02 +0300 |
---|---|---|
committer | Riku Isokoski <riksu9000@gmail.com> | 2021-10-25 17:13:02 +0300 |
commit | 887c409b135bb2f21f2fb5ae70a4d8831049d14d (patch) | |
tree | bc87b223cb2eec5a5cfc4b2aa4edaf98a93b5577 /src/systemtask/SystemTask.cpp | |
parent | 351c60a13167c05dfdbb0516f84077a4cd6adeec (diff) |
Only wake up on press. Fixes issue with longer press and sleep
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
-rw-r--r-- | src/systemtask/SystemTask.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 85cefb6f..51dbc3e3 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -337,15 +337,14 @@ void SystemTask::Work() { break; case Messages::HandleButtonEvent: { // This is for faster wakeup, sacrificing special longpress and doubleclick handling while sleeping - if (IsSleeping()) { - GoToRunning(); - break; - } - Controllers::ButtonActions action; if (nrf_gpio_pin_read(Pinetime::PinMap::Button) == 0) { action = buttonHandler.HandleEvent(Controllers::ButtonHandler::Events::Release); } else { + if (IsSleeping()) { + GoToRunning(); + break; + } action = buttonHandler.HandleEvent(Controllers::ButtonHandler::Events::Press); } HandleButtonAction(action); |