watch_disable_buzzer();
}
+static void set_initial_clock_mode(void) {
+#ifdef CLOCK_FACE_24H_ONLY
+ movement_state.settings.bit.clock_mode_24h = true;
+#else
+ movement_state.settings.bit.clock_mode_24h = MOVEMENT_DEFAULT_24H_MODE;
+#endif
+}
+
void movement_play_signal(void) {
void *maybe_disable_buzzer = end_buzzing_and_disable_buzzer;
if (watch_is_buzzer_or_led_enabled()) {
#endif
memset(&movement_state, 0, sizeof(movement_state));
-
-#ifdef CLOCK_FACE_24H_ONLY
- movement_state.settings.bit.clock_mode_24h = true;
-#else
- movement_state.settings.bit.clock_mode_24h = MOVEMENT_DEFAULT_24H_MODE;
-#endif
+ set_initial_clock_mode();
movement_state.settings.bit.led_red_color = MOVEMENT_DEFAULT_RED_COLOR;
movement_state.settings.bit.led_green_color = MOVEMENT_DEFAULT_GREEN_COLOR;
movement_state.settings.bit.button_should_sound = MOVEMENT_DEFAULT_BUTTON_SOUND;
} clock_state_t;
static bool clock_is_in_24h_mode(movement_settings_t *settings) {
+#ifdef CLOCK_FACE_24H_ONLY
+ return true;
+#else
return settings->bit.clock_mode_24h;
+#endif
}
static void clock_indicate(WatchIndicatorSegment indicator, bool on) {
if (watch_tick_animation_is_running()) watch_stop_tick_animation();
+#ifdef CLOCK_FACE_24H_ONLY
+ watch_set_indicator(WATCH_INDICATOR_24H);
+#else
if (settings->bit.clock_mode_24h) watch_set_indicator(WATCH_INDICATOR_24H);
+#endif
// handle chime indicator
if (state->signal_enabled) watch_set_indicator(WATCH_INDICATOR_BELL);
sprintf(buf, "%02d%02d", date_time.unit.minute, date_time.unit.second);
} else {
// other stuff changed; let's do it all.
+#ifndef CLOCK_FACE_24H_ONLY
if (!settings->bit.clock_mode_24h) {
// if we are in 12 hour mode, do some cleanup.
if (date_time.unit.hour < 12) {
date_time.unit.hour %= 12;
if (date_time.unit.hour == 0) date_time.unit.hour = 12;
}
+#endif
pos = 0;
if (event.event_type == EVENT_LOW_ENERGY_UPDATE) {
if (!watch_tick_animation_is_running()) watch_start_tick_animation(500);