diff options
author | James Haggerty <james@gruemail.com> | 2022-10-30 09:01:05 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-29 17:01:05 -0500 |
commit | d994ce8b48d752148d1218c5b647d6a7c1921495 (patch) | |
tree | 1252f012d69701dd16b9d33af6ed7a542177453c | |
parent | cb69a2c181a3126ade2044f223b74077f48e0c77 (diff) | |
download | Sensor-Watch-d994ce8b48d752148d1218c5b647d6a7c1921495.tar.gz Sensor-Watch-d994ce8b48d752148d1218c5b647d6a7c1921495.tar.bz2 Sensor-Watch-d994ce8b48d752148d1218c5b647d6a7c1921495.zip |
Make countdown face reset to 0 (#90)
* Make countdown face reset to 0
It was annoying to have countdowns less than DEFAULT_MINUTES.
Admittedly, this does make DEFAULT_MINUTES fairly useless, since
we only ever see it the first time...
* Undo accidental change to movement_config.h
-rw-r--r-- | movement/watch_faces/complication/countdown_face.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/movement/watch_faces/complication/countdown_face.c b/movement/watch_faces/complication/countdown_face.c index 81836f37..ee523b41 100644 --- a/movement/watch_faces/complication/countdown_face.c +++ b/movement/watch_faces/complication/countdown_face.c @@ -179,7 +179,10 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings, reset(state); break; case cd_waiting: - start(state, settings); + if (!(state->minutes == 0 && state->seconds == 0)) { + // Only start the timer if we have a valid time. + start(state, settings); + } break; case cd_setting: settings_increment(state); @@ -192,7 +195,7 @@ bool countdown_face_loop(movement_event_t event, movement_settings_t *settings, break; case EVENT_ALARM_LONG_PRESS: if (state->mode == cd_setting) { - state->minutes = DEFAULT_MINUTES; + state->minutes = 0; state->seconds = 0; draw(state, event.subsecond); break; |