refactor movement's 24h mode to a function call

This commit is contained in:
joeycastillo
2024-09-29 08:02:20 -04:00
parent 63e0981693
commit c5e5bc1200
27 changed files with 61 additions and 48 deletions

View File

@@ -50,7 +50,7 @@ void weeknumber_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);
if (movement_clock_mode_24h()) watch_set_indicator(WATCH_INDICATOR_24H);
// handle chime indicator
if (state->signal_enabled) watch_set_indicator(WATCH_INDICATOR_BELL);
@@ -100,7 +100,7 @@ bool weeknumber_clock_face_loop(movement_event_t event, movement_settings_t *set
sprintf(buf, "%02d%02d", date_time.unit.minute, watch_utility_get_weeknumber(date_time.unit.year, date_time.unit.month, date_time.unit.day));
} else {
// other stuff changed; let's do it all.
if (!settings->bit.clock_mode_24h) {
if (!movement_clock_mode_24h()) {
// if we are in 12 hour mode, do some cleanup.
if (date_time.unit.hour < 12) {
watch_clear_indicator(WATCH_INDICATOR_PM);