summaryrefslogtreecommitdiffstats
path: root/movement/movement.c
diff options
context:
space:
mode:
Diffstat (limited to 'movement/movement.c')
-rw-r--r--movement/movement.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/movement/movement.c b/movement/movement.c
index 6c5f93a0..05da1800 100644
--- a/movement/movement.c
+++ b/movement/movement.c
@@ -218,6 +218,26 @@ void movement_illuminate_led(void) {
}
}
+bool movement_default_loop_handler(movement_event_t event, movement_settings_t *settings) {
+ (void)settings;
+
+ 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_MODE_LONG_PRESS:
+ movement_move_to_face(0);
+ break;
+ default:
+ break;
+ }
+
+ return true;
+}
+
void movement_move_to_face(uint8_t watch_face_index) {
movement_state.watch_face_changed = true;
movement_state.next_watch_face = watch_face_index;