Add stopwatch face to movement
Simple stopwatch that only counts seconds (not subseconds), minutes and yes, even hours
This commit is contained in:
26
movement/watch_faces/complications/stopwatch_face.h
Normal file
26
movement/watch_faces/complications/stopwatch_face.h
Normal file
@@ -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_
|
||||
Reference in New Issue
Block a user