Movement: give watch faces their index at setup time
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user