From 830200f9c3e7635cf88d42f42f1f0f6e4b0c99a6 Mon Sep 17 00:00:00 2001 From: Matheus Afonso Martins Moreira Date: Sun, 25 Feb 2024 13:31:28 -0300 Subject: [PATCH] faces/clock: reorder periodic battery check Check the battery after the time has been updated. Place all the indication code next to each other. --- movement/watch_faces/clock/clock_face.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/movement/watch_faces/clock/clock_face.c b/movement/watch_faces/clock/clock_face.c index 36f21ff9..4fe02376 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: