From: Matheus Afonso Martins Moreira Date: Sun, 25 Feb 2024 16:31:28 +0000 (-0300) Subject: faces/clock: reorder periodic battery check X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=830200f9c3e7635cf88d42f42f1f0f6e4b0c99a6;p=sensor-watch.git faces/clock: reorder periodic battery check Check the battery after the time has been updated. Place all the indication code next to each other. --- diff --git a/movement/watch_faces/clock/clock_face.c b/movement/watch_faces/clock/clock_face.c index 36f21ff..4fe0237 100644 --- a/movement/watch_faces/clock/clock_face.c +++ b/movement/watch_faces/clock/clock_face.c @@ -218,9 +218,6 @@ bool clock_face_loop(movement_event_t event, movement_settings_t *settings, void previous.reg = state->previous_date_time; state->previous_date_time = current.reg; - clock_check_battery_periodically(state, date_time); - clock_indicate_low_available_power(state); - if (!clock_display_some(current, previous)) { if (!settings->bit.clock_mode_24h) { // if we are in 12 hour mode, do some cleanup. @@ -230,8 +227,10 @@ bool clock_face_loop(movement_event_t event, movement_settings_t *settings, void clock_display_all(current); } + clock_check_battery_periodically(state, current); clock_indicate_alarm(settings); + clock_indicate_low_available_power(state); break; case EVENT_ALARM_LONG_PRESS: