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

@@ -100,18 +100,18 @@ bool thermistor_logging_face_loop(movement_event_t event, movement_settings_t *s
break;
case EVENT_LIGHT_BUTTON_DOWN:
logger_state->ts_ticks = 2;
_thermistor_logging_face_update_display(logger_state, settings->bit.use_imperial_units, settings->bit.clock_mode_24h);
_thermistor_logging_face_update_display(logger_state, settings->bit.use_imperial_units, movement_clock_mode_24h());
break;
case EVENT_ALARM_BUTTON_DOWN:
logger_state->display_index = (logger_state->display_index + 1) % THERMISTOR_LOGGING_NUM_DATA_POINTS;
logger_state->ts_ticks = 0;
// fall through
case EVENT_ACTIVATE:
_thermistor_logging_face_update_display(logger_state, settings->bit.use_imperial_units, settings->bit.clock_mode_24h);
_thermistor_logging_face_update_display(logger_state, settings->bit.use_imperial_units, movement_clock_mode_24h());
break;
case EVENT_TICK:
if (logger_state->ts_ticks && --logger_state->ts_ticks == 0) {
_thermistor_logging_face_update_display(logger_state, settings->bit.use_imperial_units, settings->bit.clock_mode_24h);
_thermistor_logging_face_update_display(logger_state, settings->bit.use_imperial_units, movement_clock_mode_24h());
}
break;
case EVENT_BACKGROUND_TASK: