diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2021-12-20 17:02:17 -0600 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2021-12-20 17:02:17 -0600 |
commit | 60fe9691917f7e40effc72b1b6c929f9ba0ba3ee (patch) | |
tree | fe3e64a49d0d440f94e3f8ac948c71edf8b2538b /movement/watch_faces/thermistor | |
parent | 03e107b81a63c08443165497d57dc2d756b78094 (diff) | |
download | Sensor-Watch-60fe9691917f7e40effc72b1b6c929f9ba0ba3ee.tar.gz Sensor-Watch-60fe9691917f7e40effc72b1b6c929f9ba0ba3ee.tar.bz2 Sensor-Watch-60fe9691917f7e40effc72b1b6c929f9ba0ba3ee.zip |
Movement: give watch faces their index at setup time
Diffstat (limited to 'movement/watch_faces/thermistor')
4 files changed, 6 insertions, 4 deletions
diff --git a/movement/watch_faces/thermistor/thermistor_logging_face.c b/movement/watch_faces/thermistor/thermistor_logging_face.c index 0d456785..094600c2 100644 --- a/movement/watch_faces/thermistor/thermistor_logging_face.c +++ b/movement/watch_faces/thermistor/thermistor_logging_face.c @@ -48,8 +48,9 @@ static void _thermistor_logging_face_update_display(thermistor_logger_state_t *l watch_display_string(buf, 0); } -void thermistor_logging_face_setup(movement_settings_t *settings, void ** context_ptr) { +void thermistor_logging_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) { (void) settings; + (void) watch_face_index; if (*context_ptr == NULL) { *context_ptr = malloc(sizeof(thermistor_logger_state_t)); memset(*context_ptr, 0, sizeof(thermistor_logger_state_t)); diff --git a/movement/watch_faces/thermistor/thermistor_logging_face.h b/movement/watch_faces/thermistor/thermistor_logging_face.h index ece89396..03e7ff3c 100644 --- a/movement/watch_faces/thermistor/thermistor_logging_face.h +++ b/movement/watch_faces/thermistor/thermistor_logging_face.h @@ -18,7 +18,7 @@ typedef struct { thermistor_logger_data_point_t data[THERMISTOR_LOGGING_NUM_DATA_POINTS]; } thermistor_logger_state_t; -void thermistor_logging_face_setup(movement_settings_t *settings, void ** context_ptr); +void thermistor_logging_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr); void thermistor_logging_face_activate(movement_settings_t *settings, void *context); bool thermistor_logging_face_loop(movement_event_t event, movement_settings_t *settings, void *context); void thermistor_logging_face_resign(movement_settings_t *settings, void *context); diff --git a/movement/watch_faces/thermistor/thermistor_readout_face.c b/movement/watch_faces/thermistor/thermistor_readout_face.c index 5478f07d..f55a4210 100644 --- a/movement/watch_faces/thermistor/thermistor_readout_face.c +++ b/movement/watch_faces/thermistor/thermistor_readout_face.c @@ -17,8 +17,9 @@ static void _thermistor_readout_face_update_display(bool in_fahrenheit) { thermistor_driver_disable(); } -void thermistor_readout_face_setup(movement_settings_t *settings, void ** context_ptr) { +void thermistor_readout_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) { (void) settings; + (void) watch_face_index; (void) context_ptr; } diff --git a/movement/watch_faces/thermistor/thermistor_readout_face.h b/movement/watch_faces/thermistor/thermistor_readout_face.h index 71d15427..dc4f1b99 100644 --- a/movement/watch_faces/thermistor/thermistor_readout_face.h +++ b/movement/watch_faces/thermistor/thermistor_readout_face.h @@ -3,7 +3,7 @@ #include "movement.h" -void thermistor_readout_face_setup(movement_settings_t *settings, void ** context_ptr); +void thermistor_readout_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr); void thermistor_readout_face_activate(movement_settings_t *settings, void *context); bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *settings, void *context); void thermistor_readout_face_resign(movement_settings_t *settings, void *context); |