Keep light on if interacting

This makes it possible to do a bunch of things without
having to keep touching the light button.

I don't really see any downside with this. If you want
the light to go off, just stop touching buttons.
This commit is contained in:
James Haggerty
2024-04-17 20:54:46 +10:00
parent 5ec3dca9e4
commit 5f1a651732
2 changed files with 12 additions and 0 deletions

View File

@@ -543,6 +543,17 @@ bool app_loop(void) {
event.subsecond = movement_state.subsecond;
// the first trip through the loop overrides the can_sleep state
can_sleep = wf->loop(event, &movement_state.settings, watch_face_contexts[movement_state.current_face_idx]);
// Keep light on if user is still interacting with the watch.
if (movement_state.light_ticks > 0) {
switch (event.event_type) {
case EVENT_LIGHT_BUTTON_DOWN:
case EVENT_MODE_BUTTON_DOWN:
case EVENT_ALARM_BUTTON_DOWN:
movement_illuminate_led();
}
}
event.event_type = EVENT_NONE;
}