From 0557684ec13e29a70502c2c29cdd00a1754ec6c9 Mon Sep 17 00:00:00 2001 From: Konrad Rieck Date: Mon, 27 Jul 2026 22:34:04 +0200 Subject: [PATCH] Return to clock mode on inactivity timeout in settings _settings_loop() never handled EVENT_TIMEOUT, so leaving the watch face parked in settings mode (4Hz tick, blinking abbreviation) with no button presses meant it stayed there indefinitely instead of returning to the clock display like every other face's settings mode does on timeout. Factor the existing EVENT_MODE_BUTTON_UP transition logic into _exit_settings_mode() and reuse it for EVENT_TIMEOUT. --- watch-faces/clock/world_clock2_face.c | 29 ++++++++++++++++++--------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/watch-faces/clock/world_clock2_face.c b/watch-faces/clock/world_clock2_face.c index 5fe8720b..7e799eea 100644 --- a/watch-faces/clock/world_clock2_face.c +++ b/watch-faces/clock/world_clock2_face.c @@ -321,6 +321,21 @@ static bool _clock_loop(movement_event_t event, world_clock2_state_t *state) return true; } +/* Leave settings mode and return to the clock display */ +static void _exit_settings_mode(movement_event_t event, world_clock2_state_t *state) +{ + /* Find next selected zone */ + if (!state->zones[state->current_zone].selected) + state->current_zone = _next_selected_zone(state, FORWARD); + + /* Switch to display mode */ + state->current_mode = WORLD_CLOCK2_MODE_CLOCK; + state->show_zone_name = NAME_DISPLAY_TIME; + refresh_face = true; + movement_request_tick_frequency(1); + _clock_display(event, state); +} + static bool _settings_loop(movement_event_t event, world_clock2_state_t *state) { uint8_t zone; @@ -358,18 +373,12 @@ static bool _settings_loop(movement_event_t event, world_clock2_state_t *state) _settings_display(event, state); break; case EVENT_MODE_BUTTON_UP: - /* Find next selected zone */ - if (!state->zones[state->current_zone].selected) - state->current_zone = _next_selected_zone(state, FORWARD); - - /* Switch to display mode */ - state->current_mode = WORLD_CLOCK2_MODE_CLOCK; - state->show_zone_name = NAME_DISPLAY_TIME; - refresh_face = true; - movement_request_tick_frequency(1); - _clock_display(event, state); + _exit_settings_mode(event, state); _beep(BEEP_BUTTON); break; + case EVENT_TIMEOUT: + _exit_settings_mode(event, state); + break; default: return movement_default_loop_handler(event); }