inactivity: Use LVGL inactivity timers

Replace custom FreeRTOS inactivity timers with LVGL inactivity timers.

DisplayApp: Trigger display activity on timer done.

inactivity: Add additional checks
The backlight could be turned on by RestoreBrightness() on ble connect
event.

inactivity: Trigger activity on screen switch

A notification timing out could put the watch to sleep immediately.
While this could be ideal behaviour, it was caused by delay in
processing the EnableSleeping event and pushing RestoreBrightness to
DisplayApp.
This commit is contained in:
Riku Isokoski
2023-02-21 23:30:43 +02:00
parent 11ade64166
commit 310ea81eec
7 changed files with 52 additions and 76 deletions

View File

@@ -69,7 +69,6 @@ void SettingDisplay::UpdateSelected(lv_obj_t* object, lv_event_t event) {
if (object == cbOption[i]) {
lv_checkbox_set_checked(cbOption[i], true);
settingsController.SetScreenTimeOut(options[i]);
app->PushMessage(Applications::Display::Messages::UpdateTimeOut);
} else {
lv_checkbox_set_checked(cbOption[i], false);
}