From 0ef80b62da5ada255ca1968e7437cb66606bd78d Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Sat, 14 Jan 2023 14:21:04 -0500 Subject: add movement_default_loop_handler, test with default watch faces --- movement/watch_faces/complication/moon_phase_face.c | 8 +------- movement/watch_faces/complication/stopwatch_face.c | 5 +---- movement/watch_faces/complication/sunrise_sunset_face.c | 7 +------ 3 files changed, 3 insertions(+), 17 deletions(-) (limited to 'movement/watch_faces/complication') diff --git a/movement/watch_faces/complication/moon_phase_face.c b/movement/watch_faces/complication/moon_phase_face.c index eb919375..9aac374a 100644 --- a/movement/watch_faces/complication/moon_phase_face.c +++ b/movement/watch_faces/complication/moon_phase_face.c @@ -155,12 +155,6 @@ bool moon_phase_face_loop(movement_event_t event, movement_settings_t *settings, watch_display_string(" ", 8); if (!watch_tick_animation_is_running()) watch_start_tick_animation(1000); break; - case EVENT_MODE_BUTTON_UP: - movement_move_to_next_face(); - break; - case EVENT_LIGHT_BUTTON_DOWN: - movement_illuminate_led(); - break; case EVENT_ALARM_BUTTON_UP: // Pressing the alarm adds an offset of one day to the displayed value, // so you can see moon phases in the future. @@ -171,7 +165,7 @@ bool moon_phase_face_loop(movement_event_t event, movement_settings_t *settings, // QUESTION: Should timeout reset offset to 0? break; default: - break; + return movement_default_loop_handler(event, settings); } return true; diff --git a/movement/watch_faces/complication/stopwatch_face.c b/movement/watch_faces/complication/stopwatch_face.c index 2a69e9d5..03a74697 100644 --- a/movement/watch_faces/complication/stopwatch_face.c +++ b/movement/watch_faces/complication/stopwatch_face.c @@ -107,9 +107,6 @@ bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, _stopwatch_face_update_display(stopwatch_state, true); } break; - case EVENT_MODE_BUTTON_UP: - movement_move_to_next_face(); - break; case EVENT_LIGHT_BUTTON_DOWN: movement_illuminate_led(); if (!stopwatch_state->running) { @@ -161,7 +158,7 @@ bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, } break; default: - break; + return movement_default_loop_handler(event, settings); } return true; diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c index 7807de83..82de9c6e 100644 --- a/movement/watch_faces/complication/sunrise_sunset_face.c +++ b/movement/watch_faces/complication/sunrise_sunset_face.c @@ -339,9 +339,6 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti _sunrise_sunset_face_update_settings_display(event, state); } break; - case EVENT_MODE_BUTTON_UP: - movement_move_to_next_face(); - break; case EVENT_LIGHT_BUTTON_DOWN: if (state->page) { state->active_digit++; @@ -360,8 +357,6 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti _sunrise_sunset_face_update(settings, state); } break; - case EVENT_LIGHT_BUTTON_UP: - break; case EVENT_ALARM_BUTTON_UP: if (state->page) { _sunrise_sunset_face_advance_digit(state); @@ -393,7 +388,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti } break; default: - break; + return movement_default_loop_handler(event, settings); } return true; -- cgit v1.2.3