~gabe/flashlight-firmware/anduril2

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/load-save-config.c

  • Committer: Gabriel Hart
  • Date: 2021-09-19 15:15:57 UTC
  • mfrom: (579.1.44 anduril2)
  • Revision ID: gabe@ghart.com-20210919151557-bb9jlz1r807rre79
Merge TK changes thru rev 623 (2021-09-17)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
        #ifdef USE_RAMP_CONFIG
30
30
        ramp_floors[0] = eeprom[ramp_smooth_floor_e];
31
31
        ramp_ceils[0] = eeprom[ramp_smooth_ceil_e];
 
32
        #ifdef USE_RAMP_SPEED_CONFIG
 
33
        ramp_speed = eeprom[ramp_speed_e];
 
34
        #endif
32
35
        ramp_floors[1] = eeprom[ramp_discrete_floor_e];
33
36
        ramp_ceils[1] = eeprom[ramp_discrete_ceil_e];
34
37
        ramp_stepss[1] = eeprom[ramp_discrete_steps_e];
35
38
        #endif
 
39
        #ifdef USE_SIMPLE_UI
 
40
        ramp_floors[2] = eeprom[simple_ui_floor_e];
 
41
        ramp_ceils[2] = eeprom[simple_ui_ceil_e];
 
42
        ramp_stepss[2] = eeprom[simple_ui_steps_e];
 
43
        simple_ui_active = eeprom[simple_ui_active_e];
 
44
        #ifdef USE_2C_STYLE_CONFIG
 
45
        ramp_2c_style_simple = eeprom[ramp_2c_style_simple_e];
 
46
        #endif
 
47
        #endif
 
48
        #ifdef USE_RAMP_AFTER_MOON_CONFIG
 
49
        dont_ramp_after_moon = eeprom[dont_ramp_after_moon_e];
 
50
        #endif
 
51
        #ifdef USE_2C_STYLE_CONFIG
 
52
        ramp_2c_style = eeprom[ramp_2c_style_e];
 
53
        #endif
36
54
        #ifdef USE_MANUAL_MEMORY
37
55
            manual_memory = eeprom[manual_memory_e];
38
56
            #ifdef USE_MANUAL_MEMORY_TIMER
59
77
        #ifdef USE_BEACON_MODE
60
78
        beacon_seconds = eeprom[beacon_seconds_e];
61
79
        #endif
62
 
        #ifdef USE_SIMPLE_UI
63
 
        simple_ui_active = eeprom[simple_ui_active_e];
64
 
        ramp_floors[2] = eeprom[simple_ui_floor_e];
65
 
        ramp_ceils[2] = eeprom[simple_ui_ceil_e];
66
 
        ramp_stepss[2] = eeprom[simple_ui_steps_e];
67
 
        #endif
68
80
        #ifdef USE_THERMAL_REGULATION
69
81
        therm_ceil = eeprom[therm_ceil_e];
70
82
        therm_cal_offset = eeprom[therm_cal_offset_e];
95
107
    #ifdef USE_RAMP_CONFIG
96
108
    eeprom[ramp_smooth_floor_e] = ramp_floors[0];
97
109
    eeprom[ramp_smooth_ceil_e] = ramp_ceils[0];
 
110
    #ifdef USE_RAMP_SPEED_CONFIG
 
111
    eeprom[ramp_speed_e] = ramp_speed;
 
112
    #endif
98
113
    eeprom[ramp_discrete_floor_e] = ramp_floors[1];
99
114
    eeprom[ramp_discrete_ceil_e] = ramp_ceils[1];
100
115
    eeprom[ramp_discrete_steps_e] = ramp_stepss[1];
101
116
    #endif
 
117
    #ifdef USE_SIMPLE_UI
 
118
    eeprom[simple_ui_floor_e] = ramp_floors[2];
 
119
    eeprom[simple_ui_ceil_e] = ramp_ceils[2];
 
120
    eeprom[simple_ui_steps_e] = ramp_stepss[2];
 
121
    eeprom[simple_ui_active_e] = simple_ui_active;
 
122
    #ifdef USE_2C_STYLE_CONFIG
 
123
    eeprom[ramp_2c_style_simple_e] = ramp_2c_style_simple;
 
124
    #endif
 
125
    #endif
 
126
    #ifdef USE_RAMP_AFTER_MOON_CONFIG
 
127
    eeprom[dont_ramp_after_moon_e] = dont_ramp_after_moon;
 
128
    #endif
 
129
    #ifdef USE_2C_STYLE_CONFIG
 
130
    eeprom[ramp_2c_style_e] = ramp_2c_style;
 
131
    #endif
102
132
    #ifdef USE_MANUAL_MEMORY
103
133
        eeprom[manual_memory_e] = manual_memory;
104
134
        #ifdef USE_MANUAL_MEMORY_TIMER
125
155
    #ifdef USE_BEACON_MODE
126
156
    eeprom[beacon_seconds_e] = beacon_seconds;
127
157
    #endif
128
 
    #ifdef USE_SIMPLE_UI
129
 
    eeprom[simple_ui_active_e] = simple_ui_active;
130
 
    eeprom[simple_ui_floor_e] = ramp_floors[2];
131
 
    eeprom[simple_ui_ceil_e] = ramp_ceils[2];
132
 
    eeprom[simple_ui_steps_e] = ramp_stepss[2];
133
 
    #endif
134
158
    #ifdef USE_THERMAL_REGULATION
135
159
    eeprom[therm_ceil_e] = therm_ceil;
136
160
    eeprom[therm_cal_offset_e] = therm_cal_offset;