~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

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

  • Committer: Selene Scriven
  • Date: 2021-08-31 19:43:43 UTC
  • mto: (483.1.136 anduril2)
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: bzr@toykeeper.net-20210831194343-dafx6td5skmjs4vx
added runtime config option for smooth ramp speed

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
        #endif
36
45
        #ifdef USE_MANUAL_MEMORY
37
46
            manual_memory = eeprom[manual_memory_e];
38
47
            #ifdef USE_MANUAL_MEMORY_TIMER
59
68
        #ifdef USE_BEACON_MODE
60
69
        beacon_seconds = eeprom[beacon_seconds_e];
61
70
        #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
71
        #ifdef USE_THERMAL_REGULATION
69
72
        therm_ceil = eeprom[therm_ceil_e];
70
73
        therm_cal_offset = eeprom[therm_cal_offset_e];
95
98
    #ifdef USE_RAMP_CONFIG
96
99
    eeprom[ramp_smooth_floor_e] = ramp_floors[0];
97
100
    eeprom[ramp_smooth_ceil_e] = ramp_ceils[0];
 
101
    #ifdef USE_RAMP_SPEED_CONFIG
 
102
    eeprom[ramp_speed_e] = ramp_speed;
 
103
    #endif
98
104
    eeprom[ramp_discrete_floor_e] = ramp_floors[1];
99
105
    eeprom[ramp_discrete_ceil_e] = ramp_ceils[1];
100
106
    eeprom[ramp_discrete_steps_e] = ramp_stepss[1];
101
107
    #endif
 
108
    #ifdef USE_SIMPLE_UI
 
109
    eeprom[simple_ui_floor_e] = ramp_floors[2];
 
110
    eeprom[simple_ui_ceil_e] = ramp_ceils[2];
 
111
    eeprom[simple_ui_steps_e] = ramp_stepss[2];
 
112
    eeprom[simple_ui_active_e] = simple_ui_active;
 
113
    #endif
102
114
    #ifdef USE_MANUAL_MEMORY
103
115
        eeprom[manual_memory_e] = manual_memory;
104
116
        #ifdef USE_MANUAL_MEMORY_TIMER
125
137
    #ifdef USE_BEACON_MODE
126
138
    eeprom[beacon_seconds_e] = beacon_seconds;
127
139
    #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
140
    #ifdef USE_THERMAL_REGULATION
135
141
    eeprom[therm_ceil_e] = therm_ceil;
136
142
    eeprom[therm_cal_offset_e] = therm_cal_offset;