diff --git a/movement.c b/movement.c index 3bf006f2..b5bb640b 100644 --- a/movement.c +++ b/movement.c @@ -399,6 +399,10 @@ void movement_set_backlight_dwell(uint8_t value) { movement_state.settings.bit.led_duration = value; } +void movement_store_settings(void) { + watch_store_backup_data(movement_state.settings.reg, 0); +} + bool movement_alarm_enabled(void) { return movement_state.settings.bit.alarm_enabled; } diff --git a/movement.h b/movement.h index a9fa4da8..c9128871 100644 --- a/movement.h +++ b/movement.h @@ -356,6 +356,8 @@ void movement_set_backlight_color(movement_color_t color); uint8_t movement_get_backlight_dwell(void); void movement_set_backlight_dwell(uint8_t value); +void movement_store_settings(void); + /// TODO: For #SecondMovement: Should we have a counter that watch faces increment when they enable an alarm, and decrement when they disable it? /// Or should there be a watch face function where watch faces can tell us if they have an alarm enabled? /// Worth considering a better way to handle this. diff --git a/movement/watch_faces/settings/save_load_face.c b/movement/watch_faces/settings/save_load_face.c index 7b4be4d8..03358726 100644 --- a/movement/watch_faces/settings/save_load_face.c +++ b/movement/watch_faces/settings/save_load_face.c @@ -48,7 +48,6 @@ static void save(save_load_state_t *state) { static void load(save_load_state_t *state, movement_settings_t *settings) { watch_store_backup_data(state->slot[state->index].b0, 0); - settings->reg = state->slot[state->index].b0; watch_store_backup_data(state->slot[state->index].b1, 1); watch_store_backup_data(state->slot[state->index].b2, 2); watch_store_backup_data(state->slot[state->index].b3, 3); diff --git a/movement/watch_faces/settings/set_time_hackwatch_face.c b/movement/watch_faces/settings/set_time_hackwatch_face.c index 551233ae..c27f4047 100644 --- a/movement/watch_faces/settings/set_time_hackwatch_face.c +++ b/movement/watch_faces/settings/set_time_hackwatch_face.c @@ -267,5 +267,5 @@ void set_time_hackwatch_face_resign(movement_settings_t *settings, void *context (void) settings; (void) context; watch_set_led_off(); - watch_store_backup_data(settings->reg, 0); + movement_store_settings(); } diff --git a/watch-faces/settings/preferences_face.c b/watch-faces/settings/preferences_face.c index 95da02d4..8fc1466e 100644 --- a/watch-faces/settings/preferences_face.c +++ b/watch-faces/settings/preferences_face.c @@ -247,5 +247,5 @@ void preferences_face_resign(movement_settings_t *settings, void *context) { (void) settings; (void) context; movement_force_led_off(); - watch_store_backup_data(settings->reg, 0); + movement_store_settings(); } diff --git a/watch-faces/settings/set_time_face.c b/watch-faces/settings/set_time_face.c index b8bdab10..312a886f 100644 --- a/watch-faces/settings/set_time_face.c +++ b/watch-faces/settings/set_time_face.c @@ -182,5 +182,5 @@ void set_time_face_resign(movement_settings_t *settings, void *context) { (void) settings; (void) context; watch_set_led_off(); - watch_store_backup_data(settings->reg, 0); + movement_store_settings(); }