diff options
author | Jeremy O'Brien <neutral@fastmail.com> | 2023-01-26 09:56:37 -0500 |
---|---|---|
committer | joeycastillo <joeycastillo@utexas.edu> | 2023-02-10 16:31:24 -0600 |
commit | a461e8e8f90f75c0d3b3e8cfb9cdc7361985bfc1 (patch) | |
tree | a114290d4cf69490afc474fc5dbb119b9c9dccd3 | |
parent | f571da434607b50ea5a829f8fdb6cdadfeb0c2a4 (diff) | |
download | Sensor-Watch-a461e8e8f90f75c0d3b3e8cfb9cdc7361985bfc1.tar.gz Sensor-Watch-a461e8e8f90f75c0d3b3e8cfb9cdc7361985bfc1.tar.bz2 Sensor-Watch-a461e8e8f90f75c0d3b3e8cfb9cdc7361985bfc1.zip |
countdown_face: implement holding light to reset the currently edited timer value (and everything below it)
-rw-r--r-- | movement/watch_faces/complication/countdown_face.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/movement/watch_faces/complication/countdown_face.c b/movement/watch_faces/complication/countdown_face.c index 4c3859da..958a5737 100644 --- a/movement/watch_faces/complication/countdown_face.c +++ b/movement/watch_faces/complication/countdown_face.c @@ -278,6 +278,21 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings, movement_request_tick_frequency(8); } break; + case EVENT_LIGHT_LONG_PRESS: + if (state->mode == cd_setting) { + switch (state->selection) { + case 0: + state->hours = 0; + // intentional fallthrough + case 1: + state->minutes = 0; + // intentional fallthrough + case 2: + state->seconds = 0; + break; + } + } + break; case EVENT_ALARM_LONG_UP: abort_quick_ticks(state); break; @@ -289,6 +304,8 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings, movement_move_to_face(0); break; case EVENT_LOW_ENERGY_UPDATE: + // intentionally squelch the light default event; we only show the light when cd is running + case EVENT_LIGHT_BUTTON_DOWN: break; default: movement_default_loop_handler(event, settings); |