diff options
author | Wesley Ellis <tahnok@gmail.com> | 2021-11-03 21:10:10 -0400 |
---|---|---|
committer | Wesley Ellis <tahnok@gmail.com> | 2021-11-10 21:17:24 -0500 |
commit | b0ec40ae460063f711cac963b2e7a0d826c710d7 (patch) | |
tree | 7730756096827133f8f9a0fe5cd0b73d959f2397 /movement/watch_faces/complications/stopwatch_face.h | |
parent | 1b4bfe35c2ee402314a4aab503bc6d5890eeee91 (diff) | |
download | Sensor-Watch-b0ec40ae460063f711cac963b2e7a0d826c710d7.tar.gz Sensor-Watch-b0ec40ae460063f711cac963b2e7a0d826c710d7.tar.bz2 Sensor-Watch-b0ec40ae460063f711cac963b2e7a0d826c710d7.zip |
Add stopwatch face to movement
Simple stopwatch that only counts seconds (not subseconds), minutes
and yes, even hours
Diffstat (limited to 'movement/watch_faces/complications/stopwatch_face.h')
-rw-r--r-- | movement/watch_faces/complications/stopwatch_face.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/movement/watch_faces/complications/stopwatch_face.h b/movement/watch_faces/complications/stopwatch_face.h new file mode 100644 index 00000000..537c01ce --- /dev/null +++ b/movement/watch_faces/complications/stopwatch_face.h @@ -0,0 +1,26 @@ +#ifndef STOPWATCH_FACE_H_ +#define STOPWATCH_FACE_H_ + +#include "movement.h" + +typedef struct { + bool running; + uint8_t seconds; + uint8_t minutes; + uint8_t hours; +} stopwatch_state_t; + +void stopwatch_face_setup(movement_settings_t *settings, void ** context_ptr); +void stopwatch_face_activate(movement_settings_t *settings, void *context); +bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context); +void stopwatch_face_resign(movement_settings_t *settings, void *context); + +static const watch_face_t stopwatch_face = { + stopwatch_face_setup, + stopwatch_face_activate, + stopwatch_face_loop, + stopwatch_face_resign, + NULL +}; + +#endif // STOPWATCH_FACE_H_
\ No newline at end of file |