diff options
author | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-24 19:52:51 -0300 |
---|---|---|
committer | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-25 15:24:14 -0300 |
commit | 113b4bba9c33bd113becbc49ac1add7fc608986b (patch) | |
tree | d61e685291aa06cb87c5c822226505e7752e0031 | |
parent | 2132320d5cd75340a1fca7238c61f4b3e7ecd069 (diff) | |
download | Sensor-Watch-113b4bba9c33bd113becbc49ac1add7fc608986b.tar.gz Sensor-Watch-113b4bba9c33bd113becbc49ac1add7fc608986b.tar.bz2 Sensor-Watch-113b4bba9c33bd113becbc49ac1add7fc608986b.zip |
faces/clock: simplify 24h indication function
Simplifies the code by adding a dedicated function for this.
-rw-r--r-- | movement/watch_faces/clock/clock_face.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/movement/watch_faces/clock/clock_face.c b/movement/watch_faces/clock/clock_face.c index 8fa15449..9eca88e9 100644 --- a/movement/watch_faces/clock/clock_face.c +++ b/movement/watch_faces/clock/clock_face.c @@ -52,6 +52,10 @@ static void clock_indicate_time_signal(clock_state_t *clock) { clock_indicate(WATCH_INDICATOR_SIGNAL, clock->time_signal_enabled); } +static void clock_indicate_24h(movement_settings_t *settings) { + clock_indicate(WATCH_INDICATOR_24H, settings->bit.clock_mode_24h); +} + void clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) { (void) settings; (void) watch_face_index; @@ -69,10 +73,9 @@ void clock_face_activate(movement_settings_t *settings, void *context) { if (watch_tick_animation_is_running()) watch_stop_tick_animation(); - if (settings->bit.clock_mode_24h) watch_set_indicator(WATCH_INDICATOR_24H); - clock_indicate_time_signal(clock); clock_indicate_alarm(settings); + clock_indicate_24h(settings); watch_set_colon(); |