diff options
author | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-24 05:17:56 -0300 |
---|---|---|
committer | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-24 05:17:56 -0300 |
commit | 30ebf4743e3693bc0740a479e9fa6460804fede4 (patch) | |
tree | 9958897285d649eb3b1a8f7794f075625a8bb597 | |
parent | 4d7727323892bcf396a6faebec6d0432c7e1ec3f (diff) | |
download | Sensor-Watch-30ebf4743e3693bc0740a479e9fa6460804fede4.tar.gz Sensor-Watch-30ebf4743e3693bc0740a479e9fa6460804fede4.tar.bz2 Sensor-Watch-30ebf4743e3693bc0740a479e9fa6460804fede4.zip |
faces/pulsometer: move structure definition
Instances of the pulsometer state structure are only passed
to the pulsometer itself and only via the opaque context pointer.
No other code uses it. There is no need to expose it in a header file
so make it an implementation detail of the watch face.
-rw-r--r-- | movement/watch_faces/complication/pulsometer_face.c | 7 | ||||
-rw-r--r-- | movement/watch_faces/complication/pulsometer_face.h | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/movement/watch_faces/complication/pulsometer_face.c b/movement/watch_faces/complication/pulsometer_face.c index 5e0209ba..8c5f1cd6 100644 --- a/movement/watch_faces/complication/pulsometer_face.c +++ b/movement/watch_faces/complication/pulsometer_face.c @@ -51,6 +51,13 @@ #define PULSOMETER_FACE_FREQUENCY (1 << PULSOMETER_FACE_FREQUENCY_FACTOR) +typedef struct { + bool measuring; + int16_t pulses; + int16_t ticks; + int8_t calibration; +} pulsometer_state_t; + static void pulsometer_display_title(pulsometer_state_t *pulsometer) { watch_display_string(PULSOMETER_FACE_TITLE, 0); } diff --git a/movement/watch_faces/complication/pulsometer_face.h b/movement/watch_faces/complication/pulsometer_face.h index ba629f2a..5c1dae91 100644 --- a/movement/watch_faces/complication/pulsometer_face.h +++ b/movement/watch_faces/complication/pulsometer_face.h @@ -71,13 +71,6 @@ #include "movement.h" -typedef struct { - bool measuring; - int16_t pulses; - int16_t ticks; - int8_t calibration; -} pulsometer_state_t; - void pulsometer_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr); void pulsometer_face_activate(movement_settings_t *settings, void *context); bool pulsometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context); |