diff options
Diffstat (limited to 'movement/watch_faces/demo')
-rw-r--r-- | movement/watch_faces/demo/character_set_face.c | 7 | ||||
-rw-r--r-- | movement/watch_faces/demo/demo_face.c | 7 | ||||
-rw-r--r-- | movement/watch_faces/demo/frequency_correction_face.c | 4 | ||||
-rw-r--r-- | movement/watch_faces/demo/hello_there_face.c | 14 | ||||
-rw-r--r-- | movement/watch_faces/demo/lis2dw_logging_face.c | 7 | ||||
-rw-r--r-- | movement/watch_faces/demo/voltage_face.c | 7 |
6 files changed, 7 insertions, 39 deletions
diff --git a/movement/watch_faces/demo/character_set_face.c b/movement/watch_faces/demo/character_set_face.c index 6aa42083..21bbc793 100644 --- a/movement/watch_faces/demo/character_set_face.c +++ b/movement/watch_faces/demo/character_set_face.c @@ -45,12 +45,6 @@ bool character_set_face_loop(movement_event_t event, movement_settings_t *settin char *c = (char *)context; char buf[11]; switch (event.event_type) { - 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: *c = (*c) + 1; if (*c & 0x80) *c = ' '; @@ -63,6 +57,7 @@ bool character_set_face_loop(movement_event_t event, movement_settings_t *settin movement_move_to_face(0); break; default: + movement_default_loop_handler(event, settings); break; } diff --git a/movement/watch_faces/demo/demo_face.c b/movement/watch_faces/demo/demo_face.c index c9a929a1..7026d3ac 100644 --- a/movement/watch_faces/demo/demo_face.c +++ b/movement/watch_faces/demo/demo_face.c @@ -65,12 +65,6 @@ bool demo_face_loop(movement_event_t event, movement_settings_t *settings, void (void) settings; demo_face_index_t *screen = (demo_face_index_t *)context; switch (event.event_type) { - 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: *screen = ((*screen) + 1) % DEMO_FACE_NUM_FACES; // fall through @@ -129,6 +123,7 @@ bool demo_face_loop(movement_event_t event, movement_settings_t *settings, void // ignore timeout break; default: + movement_default_loop_handler(event, settings); break; } diff --git a/movement/watch_faces/demo/frequency_correction_face.c b/movement/watch_faces/demo/frequency_correction_face.c index a46f192a..3fdef7ee 100644 --- a/movement/watch_faces/demo/frequency_correction_face.c +++ b/movement/watch_faces/demo/frequency_correction_face.c @@ -96,9 +96,6 @@ bool frequency_correction_face_loop(movement_event_t event, movement_settings_t break; case EVENT_TICK: break; - case EVENT_MODE_BUTTON_UP: - movement_move_to_next_face(); - break; case EVENT_LIGHT_BUTTON_UP: freqcorr = RTC->MODE2.FREQCORR.reg; if (freqcorr < 127) { @@ -126,6 +123,7 @@ bool frequency_correction_face_loop(movement_event_t event, movement_settings_t watch_start_tick_animation(500); break; default: + movement_default_loop_handler(event, settings); break; } diff --git a/movement/watch_faces/demo/hello_there_face.c b/movement/watch_faces/demo/hello_there_face.c index f21cb762..97af2579 100644 --- a/movement/watch_faces/demo/hello_there_face.c +++ b/movement/watch_faces/demo/hello_there_face.c @@ -66,18 +66,6 @@ bool hello_there_face_loop(movement_event_t event, movement_settings_t *settings state->current_word = (state->current_word + 1) % 2; } break; - case EVENT_LIGHT_BUTTON_UP: - // when the user presses 'light', we illuminate the LED. We could override this if - // our UI needed an additional button for input, consuming the light button press - // but not illuminating the LED. - movement_illuminate_led(); - break; - case EVENT_MODE_BUTTON_UP: - // when the user presses 'mode', we tell movement to move to the next watch face. - // movement will call our resign function, clear the screen, and transfer control - // to the next watch face in the list. - movement_move_to_next_face(); - break; case EVENT_ALARM_BUTTON_UP: // when the user presses 'alarm', we toggle the state of the animation. If animating, // we stop; if stopped, we resume. @@ -97,7 +85,9 @@ bool hello_there_face_loop(movement_event_t event, movement_settings_t *settings // and it will do it long before the watch enters low energy mode. This ensures we // won't be on screen, and thus opts us out of getting the EVENT_LOW_ENERGY_UPDATE above. movement_move_to_face(0); + break; default: + movement_default_loop_handler(event, settings); break; } diff --git a/movement/watch_faces/demo/lis2dw_logging_face.c b/movement/watch_faces/demo/lis2dw_logging_face.c index 0e63e41e..0a957bb4 100644 --- a/movement/watch_faces/demo/lis2dw_logging_face.c +++ b/movement/watch_faces/demo/lis2dw_logging_face.c @@ -146,12 +146,6 @@ bool lis2dw_logging_face_loop(movement_event_t event, movement_settings_t *setti lis2dw_interrupt_source interrupt_source = 0; switch (event.event_type) { - case EVENT_MODE_BUTTON_UP: - movement_move_to_next_face(); - break; - case EVENT_LIGHT_LONG_PRESS: - movement_illuminate_led(); - break; case EVENT_LIGHT_BUTTON_DOWN: logger_state->axis_index = (logger_state->axis_index + 1) % 4; logger_state->log_ticks = 255; @@ -187,6 +181,7 @@ bool lis2dw_logging_face_loop(movement_event_t event, movement_settings_t *setti _lis2dw_logging_face_log_data(logger_state); break; default: + movement_default_loop_handler(event, settings); break; } diff --git a/movement/watch_faces/demo/voltage_face.c b/movement/watch_faces/demo/voltage_face.c index 2a568d2c..51ed9ccb 100644 --- a/movement/watch_faces/demo/voltage_face.c +++ b/movement/watch_faces/demo/voltage_face.c @@ -55,12 +55,6 @@ bool voltage_face_loop(movement_event_t event, movement_settings_t *settings, vo (void) context; watch_date_time date_time; switch (event.event_type) { - case EVENT_MODE_BUTTON_UP: - movement_move_to_next_face(); - break; - case EVENT_LIGHT_BUTTON_DOWN: - movement_illuminate_led(); - break; case EVENT_ACTIVATE: _voltage_face_update_display(); break; @@ -78,6 +72,7 @@ bool voltage_face_loop(movement_event_t event, movement_settings_t *settings, vo watch_display_string("BA SLEEP ", 0); break; default: + movement_default_loop_handler(event, settings); break; } |