aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/anduril/load-save-config.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/load-save-config.c48
1 files changed, 36 insertions, 12 deletions
diff --git a/spaghetti-monster/anduril/load-save-config.c b/spaghetti-monster/anduril/load-save-config.c
index cd29ca5..ee451ac 100644
--- a/spaghetti-monster/anduril/load-save-config.c
+++ b/spaghetti-monster/anduril/load-save-config.c
@@ -29,10 +29,28 @@ void load_config() {
#ifdef USE_RAMP_CONFIG
ramp_floors[0] = eeprom[ramp_smooth_floor_e];
ramp_ceils[0] = eeprom[ramp_smooth_ceil_e];
+ #ifdef USE_RAMP_SPEED_CONFIG
+ ramp_speed = eeprom[ramp_speed_e];
+ #endif
ramp_floors[1] = eeprom[ramp_discrete_floor_e];
ramp_ceils[1] = eeprom[ramp_discrete_ceil_e];
ramp_stepss[1] = eeprom[ramp_discrete_steps_e];
#endif
+ #ifdef USE_SIMPLE_UI
+ ramp_floors[2] = eeprom[simple_ui_floor_e];
+ ramp_ceils[2] = eeprom[simple_ui_ceil_e];
+ ramp_stepss[2] = eeprom[simple_ui_steps_e];
+ simple_ui_active = eeprom[simple_ui_active_e];
+ #ifdef USE_2C_STYLE_CONFIG
+ ramp_2c_style_simple = eeprom[ramp_2c_style_simple_e];
+ #endif
+ #endif
+ #ifdef USE_RAMP_AFTER_MOON_CONFIG
+ dont_ramp_after_moon = eeprom[dont_ramp_after_moon_e];
+ #endif
+ #ifdef USE_2C_STYLE_CONFIG
+ ramp_2c_style = eeprom[ramp_2c_style_e];
+ #endif
#ifdef USE_MANUAL_MEMORY
manual_memory = eeprom[manual_memory_e];
#ifdef USE_MANUAL_MEMORY_TIMER
@@ -59,12 +77,6 @@ void load_config() {
#ifdef USE_BEACON_MODE
beacon_seconds = eeprom[beacon_seconds_e];
#endif
- #ifdef USE_SIMPLE_UI
- simple_ui_active = eeprom[simple_ui_active_e];
- ramp_floors[2] = eeprom[simple_ui_floor_e];
- ramp_ceils[2] = eeprom[simple_ui_ceil_e];
- ramp_stepss[2] = eeprom[simple_ui_steps_e];
- #endif
#ifdef USE_THERMAL_REGULATION
therm_ceil = eeprom[therm_ceil_e];
therm_cal_offset = eeprom[therm_cal_offset_e];
@@ -95,10 +107,28 @@ void save_config() {
#ifdef USE_RAMP_CONFIG
eeprom[ramp_smooth_floor_e] = ramp_floors[0];
eeprom[ramp_smooth_ceil_e] = ramp_ceils[0];
+ #ifdef USE_RAMP_SPEED_CONFIG
+ eeprom[ramp_speed_e] = ramp_speed;
+ #endif
eeprom[ramp_discrete_floor_e] = ramp_floors[1];
eeprom[ramp_discrete_ceil_e] = ramp_ceils[1];
eeprom[ramp_discrete_steps_e] = ramp_stepss[1];
#endif
+ #ifdef USE_SIMPLE_UI
+ eeprom[simple_ui_floor_e] = ramp_floors[2];
+ eeprom[simple_ui_ceil_e] = ramp_ceils[2];
+ eeprom[simple_ui_steps_e] = ramp_stepss[2];
+ eeprom[simple_ui_active_e] = simple_ui_active;
+ #ifdef USE_2C_STYLE_CONFIG
+ eeprom[ramp_2c_style_simple_e] = ramp_2c_style_simple;
+ #endif
+ #endif
+ #ifdef USE_RAMP_AFTER_MOON_CONFIG
+ eeprom[dont_ramp_after_moon_e] = dont_ramp_after_moon;
+ #endif
+ #ifdef USE_2C_STYLE_CONFIG
+ eeprom[ramp_2c_style_e] = ramp_2c_style;
+ #endif
#ifdef USE_MANUAL_MEMORY
eeprom[manual_memory_e] = manual_memory;
#ifdef USE_MANUAL_MEMORY_TIMER
@@ -125,12 +155,6 @@ void save_config() {
#ifdef USE_BEACON_MODE
eeprom[beacon_seconds_e] = beacon_seconds;
#endif
- #ifdef USE_SIMPLE_UI
- eeprom[simple_ui_active_e] = simple_ui_active;
- eeprom[simple_ui_floor_e] = ramp_floors[2];
- eeprom[simple_ui_ceil_e] = ramp_ceils[2];
- eeprom[simple_ui_steps_e] = ramp_stepss[2];
- #endif
#ifdef USE_THERMAL_REGULATION
eeprom[therm_ceil_e] = therm_ceil;
eeprom[therm_cal_offset_e] = therm_cal_offset;