aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-09-24 08:40:21 -0600
committerSelene ToyKeeper2020-09-24 08:40:21 -0600
commit0030172d385df682beb82abe1dbe2043e4ab9aed (patch)
tree3b93f6d03b999dcb8f5e4aa1594a6a8204732286
parentclearer comments about "Ramp 2C" behaviors with each build option (diff)
downloadanduril-0030172d385df682beb82abe1dbe2043e4ab9aed.tar.gz
anduril-0030172d385df682beb82abe1dbe2043e4ab9aed.tar.bz2
anduril-0030172d385df682beb82abe1dbe2043e4ab9aed.zip
changed menu style and moved menus from "click" events to "hold" events
(also reduced ROM size by 126 bytes)
-rw-r--r--spaghetti-monster/anduril/anduril-manual.txt64
-rw-r--r--spaghetti-monster/anduril/battcheck-mode.c9
-rw-r--r--spaghetti-monster/anduril/battcheck-mode.h2
-rw-r--r--spaghetti-monster/anduril/config-mode.c160
-rw-r--r--spaghetti-monster/anduril/config-mode.h14
-rw-r--r--spaghetti-monster/anduril/factory-reset.c4
-rw-r--r--spaghetti-monster/anduril/lockout-mode.c18
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c49
-rw-r--r--spaghetti-monster/anduril/ramp-mode.h2
-rw-r--r--spaghetti-monster/anduril/tempcheck-mode.c31
-rw-r--r--spaghetti-monster/anduril/tempcheck-mode.h2
11 files changed, 180 insertions, 175 deletions
diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt
index 633ac35..ad22153 100644
--- a/spaghetti-monster/anduril/anduril-manual.txt
+++ b/spaghetti-monster/anduril/anduril-manual.txt
@@ -137,14 +137,15 @@ While the light is on, a few basic actions are available:
- 5C: Go to momentary mode.
- 5H: Start a sunset timer. Details are below in the Sunset Timer section.
- - 7C: Go to ramp config mode.
+ - 7H: Go to ramp config mode.
- 10C: Activate manual memory and save the current brightness.
- Or, if it was already set to the current brightness, deactivate
- manual memory and go back to automatic memory.
- - 10H: Configure the manual memory timer, on lights where it is
- supported. Otherwise, if not supported, 10H goes back to
- automatic memory.
+ - 10H: Manual memory config menu.
+ - Item 1: Disable manual memory and go back to automatic memory.
+ (doesn't matter what value the user enters at the prompt)
+ - Item 2: Configure the manual memory timer.
+ Sets the timer to N minutes, where N is the number of
+ clicks. A value of 0 (no clicks) turns the timer off.
The "automatic" vs "manual" memory modes change the level the light goes
to with 1 click from off. In automatic mode, it uses the last
@@ -250,7 +251,7 @@ In all of these modes, some basic actions are available:
Additionally, in battery check and temperature check modes:
- - 7 clicks: Go to the voltage config mode or thermal config mode.
+ - 7H: Go to the voltage config mode or thermal config mode.
In more detail, this is what each blinky / utility mode does:
@@ -426,28 +427,27 @@ Every config mode has the same interface. The menu has one or more
options the user can configure, and it will go through them in order.
For each menu item, the light will follow the same pattern:
- - Blink one or more times, corresponding to the item number.
+ - Blink once, then go to a lower brightness. The user can keep
+ holding the button to skip this menu item, or release the button to
+ dive in and enter a new value.
- - Stutter or "buzz" quickly between two brightness levels for a few
- seconds. This indicates that the user can click one or more times
- to enter a number. It will keep buzzing until the user stops
- clicking, so there is no need to hurry.
+ - If the user released the button:
- - Pause, and then go to the next option.
+ - Stutter or "buzz" quickly between two brightness levels for a few
+ seconds. This indicates that the user can click one or more times
+ to enter a number. It will keep buzzing until the user stops
+ clicking, so there is no need to hurry.
-After the light has gone through all of the menu options, it should
-return to whatever mode the light was in before entering the config
-mode.
-
-If the user doesn't press a button during a menu item's "buzz" phase,
-that item remains unchanged from its previous value.
+After entering a number, or after skipping every menu item, it waits
+until the button is released then exits the menu. It should return to
+whatever mode the light was in before entering the config mode.
Ramp Config Mode
----------------
-While the light is on in a ramping mode, click 7 times to enter the
-config mode for the current ramp.
+While the light is on in a ramping mode, click 7 times (but hold the
+final click) to enter the config mode for the current ramp.
Or, to access the ramp config for Simple UI, make sure the Simple UI is
not active, then do a 10H action from Off.
@@ -603,7 +603,7 @@ Off Full 7C Aux LEDs: Next pattern
Off Full 7H Aux LEDs: Next color
Off Full 10C Enable Simple UI
Off Simple 10H Disable Simple UI
-Off Full 10H Simple UI ramp config menu
+Off Full 10H Simple UI ramp config menu (1: floor, 2: ceiling, [3: steps])
Off Any 13H Factory reset (on some lights)
Off Any 15+C Version check
@@ -617,10 +617,9 @@ Ramp Any 3H Tint ramping (on some lights)
Ramp Any 4C Lockout mode
Ramp Full 5C Momentary mode
Ramp Full 5H Sunset timer on, and add 5 minutes
-Ramp Full 7C Ramp config mode
-Ramp Full 10C Toggle manual memory on/off at current brightness
-Ramp Full 10H Manual memory timer config menu
-Ramp Full 10H Disable manual memory (if manual mem timer not compiled in)
+Ramp Full 7H Ramp config mode (1: floor, 2: ceiling, [3: steps])
+Ramp Full 10C Turn on manual memory and save current brightness
+Ramp Full 10H Manual memory config menu (1: off, 2: set timeout)
Lockout Any 1C/1H Momentary moon (lowest floor)
Lockout Any 2C/2H Momentary moon (highest floor, or manual mem level)
@@ -629,8 +628,7 @@ Lockout Any 4H On (ramp mode, floor level)
Lockout Any 5C On (ramp mode, ceiling level)
Lockout Full 7C Aux LEDs: Next pattern
Lockout Full 7H Aux LEDs: Next color
-Lockout Full 10C Auto-lock config menu
-Lockout Full 10H Disable Auto-lock
+Lockout Full 10H Auto-lock config menu (1: set timeout)
Strobe (any) Full 1C Off
Strobe (any) Full 2C Next strobe mode
@@ -646,7 +644,7 @@ Lightning Full 1H Interrupt current flash or start new one
Batt check Any 1C Off
Batt check Full 2C Next blinky mode (Beacon, SOS, Temp check)
-Batt check Full 7C Voltage config mode
+Batt check Full 7H Voltage config mode
Beacon Full 1C Off
Beacon Full 1H Configure beacon timing
@@ -657,10 +655,12 @@ SOS Full 2C Next blinky mode (Temp check, Batt check)
Temp check Full 1C Off
Temp check Full 2C Next blinky mode (Batt check)
-Temp check Full 7C Thermal config mode
+Temp check Full 7H Thermal config mode
Momentary Full Any On (until button is released)
Momentary Full Disconnect power Exit Momentary mode
-Config modes Full None Skip current item with no changes
-Config modes Full 1+C Enter new numeric value for current item
+Config modes Full Hold Skip current item with no changes
+Config modes Full Release Configure current item
+
+Number entry Full Click Add 1 to value for current item
diff --git a/spaghetti-monster/anduril/battcheck-mode.c b/spaghetti-monster/anduril/battcheck-mode.c
index 3b4a144..31c320a 100644
--- a/spaghetti-monster/anduril/battcheck-mode.c
+++ b/spaghetti-monster/anduril/battcheck-mode.c
@@ -51,8 +51,8 @@ uint8_t battcheck_state(Event event, uint16_t arg) {
#endif
#ifdef USE_VOLTAGE_CORRECTION
- // 7 clicks: voltage config mode
- else if (event == EV_7clicks) {
+ // 7H: voltage config mode
+ else if (event == EV_click7_hold) {
push_state(voltage_config_state, 0);
return MISCHIEF_MANAGED;
}
@@ -70,9 +70,8 @@ uint8_t battcheck_state(Event event, uint16_t arg) {
// 8 = add 0.05V
// ...
// 13 = add 0.30V
-void voltage_config_save() {
- uint8_t foo = config_state_values[0];
- if (foo) voltage_correction = config_state_values[0];
+void voltage_config_save(uint8_t step, uint8_t value) {
+ if (value) voltage_correction = value;
}
uint8_t voltage_config_state(Event event, uint16_t arg) {
diff --git a/spaghetti-monster/anduril/battcheck-mode.h b/spaghetti-monster/anduril/battcheck-mode.h
index 8ddf31d..965ffd9 100644
--- a/spaghetti-monster/anduril/battcheck-mode.h
+++ b/spaghetti-monster/anduril/battcheck-mode.h
@@ -23,7 +23,7 @@
uint8_t battcheck_state(Event event, uint16_t arg);
#ifdef USE_VOLTAGE_CORRECTION
-void voltage_config_save();
+void voltage_config_save(uint8_t step, uint8_t value);
uint8_t voltage_config_state(Event event, uint16_t arg);
#endif
diff --git a/spaghetti-monster/anduril/config-mode.c b/spaghetti-monster/anduril/config-mode.c
index ea4ce6b..f5bfbc2 100644
--- a/spaghetti-monster/anduril/config-mode.c
+++ b/spaghetti-monster/anduril/config-mode.c
@@ -28,122 +28,144 @@ uint8_t number_entry_state(Event event, uint16_t arg);
volatile uint8_t number_entry_value;
-// ask the user for a sequence of numbers, then save them and return to caller
+// allow the user to set a new value for a config option
+// can be called two ways:
+// - with a "click" action: Configures first menu item only.
+// - with a "hold" action: Sets user select a menu item and then
+// choose a new value for it. User should hold button until light
+// blinks N times, to choose menu item N. Then let go, and light
+// should give a buzzing prompt to enter a number. Click N times
+// at the prompt to set the new value to N.
+// after completing this process, config state calls the savefunc callback
+// and then returns to caller/parent state
uint8_t config_state_base(Event event, uint16_t arg,
uint8_t num_config_steps,
- void (*savefunc)()) {
+ void (*savefunc)(uint8_t step, uint8_t value)) {
static uint8_t config_step;
+ static uint8_t config_state_done;
if (event == EV_enter_state) {
config_step = 0;
+ config_state_done = 0;
set_level(0);
+ // if button isn't held, configure first menu item
+ if (! button_last_state) {
+ push_state(number_entry_state, 0);
+ }
return MISCHIEF_MANAGED;
}
- // advance forward through config steps
- else if (event == EV_tick) {
- if (config_step < num_config_steps) {
- push_state(number_entry_state, config_step + 1);
+
+ // if initial "hold" event still active
+ // blink while holding to indicate option number
+ #define B_CLICK_FLAGS (B_CLICK|B_HOLD|B_PRESS|B_RELEASE|B_TIMEOUT)
+ #define B_ANY_HOLD (B_CLICK|B_HOLD|B_PRESS)
+ #define B_ANY_HOLD_RELEASE (B_CLICK|B_HOLD|B_RELEASE|B_TIMEOUT)
+ else if ((event & B_CLICK_FLAGS) == B_ANY_HOLD) {
+ if (config_step <= num_config_steps) {
+ if (2 == (arg % (TICKS_PER_SECOND*3/2))) {
+ config_step ++;
+ // blink when config step advances
+ if (config_step <= num_config_steps)
+ set_level(RAMP_SIZE * 3 / 8);
+ }
+ else {
+ // stay on at a low level to indicate menu is active
+ set_level(RAMP_SIZE * 1 / 8);
+ }
+ } else {
+ // turn off when end of menu is reached
+ set_level(0);
}
+ }
+
+ // button release: activate number entry for one menu item
+ else if ((event & B_CLICK_FLAGS) == B_ANY_HOLD_RELEASE) {
+ // let user know we noticed what they did
+ set_level(0);
+
+ // ask the user for a number, if they selected a menu item
+ if (config_step <= num_config_steps) {
+ push_state(number_entry_state, 0);
+ }
+ // exit after falling out of end of menu
else {
- // TODO: blink out some sort of success pattern
- savefunc();
- save_config();
- //set_state(retstate, retval);
- pop_state();
+ config_state_done = 1;
}
- return MISCHIEF_MANAGED;
}
+
// an option was set (return from number_entry_state)
else if (event == EV_reenter_state) {
- config_state_values[config_step] = number_entry_value;
- config_step ++;
+ // process value with parent's callback
+ savefunc(config_step, number_entry_value);
+ // make changes persist in eeprom
+ save_config();
+ config_state_done = 1;
return MISCHIEF_MANAGED;
}
- //return EVENT_NOT_HANDLED;
+
+ // all finished
+ else if (config_state_done) {
+ config_state_done = 0; // ensure this only happens once
+ pop_state();
+ }
+
// eat all other events; don't pass any through to parent
return EVENT_HANDLED;
}
uint8_t number_entry_state(Event event, uint16_t arg) {
- static uint8_t value;
- static uint8_t blinks_left;
static uint8_t entry_step;
- static uint16_t wait_ticks;
+
if (event == EV_enter_state) {
- value = 0;
- blinks_left = arg;
+ number_entry_value = 0;
entry_step = 0;
- wait_ticks = 0;
return MISCHIEF_MANAGED;
}
+
// advance through the process:
// 0: wait a moment
- // 1: blink out the 'arg' value
- // 2: wait a moment
- // 3: "buzz" while counting clicks
- // 4: save and exit
+ // 1: "buzz" while counting clicks
+ // 2: save and exit
else if (event == EV_tick) {
// wait a moment
- if ((entry_step == 0) || (entry_step == 2)) {
- if (wait_ticks < TICKS_PER_SECOND/2)
- wait_ticks ++;
- else {
+ if (entry_step == 0) {
+ if (arg > TICKS_PER_SECOND/2) {
entry_step ++;
- wait_ticks = 0;
+ empty_event_sequence(); // reset tick counter to 0
}
}
- // blink out the option number
+ // buzz while waiting for a number to be entered
else if (entry_step == 1) {
- if (blinks_left) {
- if ((wait_ticks & 31) == 10) {
- set_level(RAMP_SIZE/4);
- }
- else if ((wait_ticks & 31) == 20) {
- set_level(0);
- }
- else if ((wait_ticks & 31) == 31) {
- blinks_left --;
- }
- wait_ticks ++;
- }
- else {
+ // time out and exit after 3 seconds
+ if (arg > TICKS_PER_SECOND*3) {
entry_step ++;
- wait_ticks = 0;
+ set_level(0);
}
- }
- else if (entry_step == 3) { // buzz while waiting for a number to be entered
- wait_ticks ++;
// buzz for N seconds after last event
- if ((wait_ticks & 3) == 0) {
- set_level(RAMP_SIZE/6);
- }
- else if ((wait_ticks & 3) == 2) {
- set_level(RAMP_SIZE/8);
- }
- // time out after 3 seconds
- if (wait_ticks > TICKS_PER_SECOND*3) {
- //number_entry_value = value;
- set_level(0);
- entry_step ++;
+ // (flicker every other frame,
+ // except first frame (so we can see flashes after each click))
+ else if (arg) {
+ set_level( (RAMP_SIZE/8)
+ + ((arg&2)<<1) );
}
}
- else if (entry_step == 4) {
- number_entry_value = value;
+ // all done, save result and return to parent state
+ else {
pop_state();
}
return MISCHIEF_MANAGED;
}
+
// count clicks
else if (event == EV_click1_release) {
- empty_event_sequence();
- if (entry_step == 3) { // only count during the "buzz"
- value ++;
- wait_ticks = 0;
- // flash briefly
- set_level(RAMP_SIZE/2);
- }
+ entry_step = 1; // in case user clicked during initial delay
+ number_entry_value ++; // update the result
+ empty_event_sequence(); // reset FSM's click count
+ set_level(RAMP_SIZE/2); // flash briefly
return MISCHIEF_MANAGED;
}
- return EVENT_NOT_HANDLED;
+
+ // eat all other events; don't pass any through to parent
+ return EVENT_HANDLED;
}
diff --git a/spaghetti-monster/anduril/config-mode.h b/spaghetti-monster/anduril/config-mode.h
index 81abf2c..7cbc534 100644
--- a/spaghetti-monster/anduril/config-mode.h
+++ b/spaghetti-monster/anduril/config-mode.h
@@ -20,13 +20,13 @@
#ifndef CONFIG_MODE_H
#define CONFIG_MODE_H
-#define MAX_CONFIG_VALUES 3
-uint8_t config_state_values[MAX_CONFIG_VALUES];
-
-// simple numeric entry config menu
-uint8_t config_state_base(Event event, uint16_t arg,
- uint8_t num_config_steps,
- void (*savefunc)());
+// config menu
+uint8_t config_state_base(
+ Event event,
+ uint16_t arg,
+ uint8_t num_config_steps,
+ void (*savefunc)(uint8_t step, uint8_t value)
+ );
#endif
diff --git a/spaghetti-monster/anduril/factory-reset.c b/spaghetti-monster/anduril/factory-reset.c
index fe961b1..c327e65 100644
--- a/spaghetti-monster/anduril/factory-reset.c
+++ b/spaghetti-monster/anduril/factory-reset.c
@@ -45,9 +45,7 @@ void factory_reset() {
if (reset) {
#ifdef USE_THERMAL_REGULATION
// auto-calibrate temperature... assume current temperature is 21 C
- config_state_values[0] = 21;
- config_state_values[1] = 0;
- thermal_config_save();
+ thermal_config_save(1, 21);
#endif
// save all settings to eeprom
// (assuming they're all at default because we haven't loaded them yet)
diff --git a/spaghetti-monster/anduril/lockout-mode.c b/spaghetti-monster/anduril/lockout-mode.c
index 9c8ac1f..8c83cff 100644
--- a/spaghetti-monster/anduril/lockout-mode.c
+++ b/spaghetti-monster/anduril/lockout-mode.c
@@ -121,18 +121,9 @@ uint8_t lockout_state(Event event, uint16_t arg) {
#endif
#ifdef USE_AUTOLOCK
- // 10 clicks: configure the autolock option
- else if (event == EV_10clicks) {
- push_state(autolock_config_state, 0);
- return MISCHIEF_MANAGED;
- }
- // 10H: turn off autolock
+ // 10H: configure the autolock option
else if (event == EV_click10_hold) {
- if (0 == arg) {
- autolock_time = 0;
- save_config();
- blink_once();
- }
+ push_state(autolock_config_state, 0);
return MISCHIEF_MANAGED;
}
#endif
@@ -193,9 +184,8 @@ uint8_t lockout_state(Event event, uint16_t arg) {
#ifdef USE_AUTOLOCK
// set the auto-lock timer to N minutes, where N is the number of clicks
-void autolock_config_save() {
- uint8_t foo = config_state_values[0];
- if (foo) autolock_time = config_state_values[0];
+void autolock_config_save(uint8_t step, uint8_t value) {
+ autolock_time = value;
}
uint8_t autolock_config_state(Event event, uint16_t arg) {
diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c
index e95bc6c..695c3a2 100644
--- a/spaghetti-monster/anduril/ramp-mode.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -368,8 +368,8 @@ uint8_t steady_state(Event event, uint16_t arg) {
#endif
#ifdef USE_RAMP_CONFIG
- // 7 clicks: configure this ramp mode
- else if (event == EV_7clicks) {
+ // 7H: configure this ramp mode
+ else if (event == EV_click7_hold) {
push_state(ramp_config_state, 0);
return MISCHIEF_MANAGED;
}
@@ -377,12 +377,7 @@ uint8_t steady_state(Event event, uint16_t arg) {
#ifdef USE_MANUAL_MEMORY
else if (event == EV_10clicks) {
- #ifdef USE_MANUAL_MEMORY_TIMER
- // first time turns on manual memory,
- // second time (at same level) goes back to automatic
- if (manual_memory == actual_level) manual_memory = 0;
- else
- #endif
+ // turn on manual memory and save current brightness
manual_memory = actual_level;
save_config();
blink_once();
@@ -409,22 +404,24 @@ uint8_t steady_state(Event event, uint16_t arg) {
#ifdef USE_RAMP_CONFIG
-void ramp_config_save() {
- // parse values
- uint8_t val;
+void ramp_config_save(uint8_t step, uint8_t value) {
+
// 0 = smooth ramp, 1 = stepped ramp, 2 = simple UI's ramp
uint8_t style = ramp_style;
if (current_state == simple_ui_config_state) style = 2;
- val = config_state_values[0];
- if (val) { ramp_floors[style] = val; }
-
- val = config_state_values[1];
- if (val) { ramp_ceils[style] = MAX_LEVEL + 1 - val; }
-
- if (style) { // smooth ramp has no third value
- val = config_state_values[2];
- if (val) ramp_stepss[style] = val;
+ // ceiling value is inverted
+ if (step == 2) value = MAX_LEVEL + 1 - value;
+
+ // save adjusted value to the correct slot
+ if (value) {
+ // which option are we configuring?
+ // TODO? maybe rearrange definitions to avoid the need for this table
+ // (move all ramp values into a single array?)
+ uint8_t *steps[] = { ramp_floors, ramp_ceils, ramp_stepss };
+ uint8_t *option;
+ option = steps[step-1];
+ option[style] = value;
}
}
@@ -442,15 +439,15 @@ uint8_t simple_ui_config_state(Event event, uint16_t arg) {
#endif // #ifdef USE_RAMP_CONFIG
#ifdef USE_MANUAL_MEMORY_TIMER
-void manual_memory_timer_config_save() {
- uint8_t val;
- // skip to keep old value, or click to use hybrid mem with N-1 minute timer
- val = config_state_values[0];
- if (val) manual_memory_timer = val - 1;
+void manual_memory_timer_config_save(uint8_t step, uint8_t value) {
+ // item 1: disable manual memory, go back to automatic
+ if (step == 1) { manual_memory = 0; }
+ // item 2: set manual memory timer duration
+ else { manual_memory_timer = value; }
}
uint8_t manual_memory_timer_config_state(Event event, uint16_t arg) {
- return config_state_base(event, arg, 1, manual_memory_timer_config_save);
+ return config_state_base(event, arg, 2, manual_memory_timer_config_save);
}
#endif
diff --git a/spaghetti-monster/anduril/ramp-mode.h b/spaghetti-monster/anduril/ramp-mode.h
index 58d65a9..b772407 100644
--- a/spaghetti-monster/anduril/ramp-mode.h
+++ b/spaghetti-monster/anduril/ramp-mode.h
@@ -118,7 +118,7 @@ uint8_t steady_state(Event event, uint16_t arg);
#ifdef USE_RAMP_CONFIG
uint8_t ramp_config_state(Event event, uint16_t arg);
-void ramp_config_save();
+void ramp_config_save(uint8_t step, uint8_t value);
#ifdef USE_SIMPLE_UI
uint8_t simple_ui_config_state(Event event, uint16_t arg);
#endif
diff --git a/spaghetti-monster/anduril/tempcheck-mode.c b/spaghetti-monster/anduril/tempcheck-mode.c
index b183200..34abeb0 100644
--- a/spaghetti-monster/anduril/tempcheck-mode.c
+++ b/spaghetti-monster/anduril/tempcheck-mode.c
@@ -35,30 +35,29 @@ uint8_t tempcheck_state(Event event, uint16_t arg) {
return MISCHIEF_MANAGED;
}
#endif
- // 7 clicks: thermal config mode
- else if (event == EV_7clicks) {
+ // 7H: thermal config mode
+ else if (event == EV_click7_hold) {
push_state(thermal_config_state, 0);
return MISCHIEF_MANAGED;
}
return EVENT_NOT_HANDLED;
}
-void thermal_config_save() {
- // parse values
- uint8_t val;
-
- // calibrate room temperature
- val = config_state_values[0];
- if (val) {
- int8_t rawtemp = temperature - therm_cal_offset;
- therm_cal_offset = val - rawtemp;
- adc_reset = 2; // invalidate all recent temperature data
+void thermal_config_save(uint8_t step, uint8_t value) {
+ // item 1: calibrate room temperature
+ if (step == 1) {
+ if (value) {
+ int8_t rawtemp = temperature - therm_cal_offset;
+ therm_cal_offset = value - rawtemp;
+ adc_reset = 2; // invalidate all recent temperature data
+ }
}
- val = config_state_values[1];
- if (val) {
- // set maximum heat limit
- therm_ceil = 30 + val - 1;
+ // item 2: set maximum heat limit
+ else {
+ if (value) {
+ therm_ceil = 30 + value - 1;
+ }
}
if (therm_ceil > MAX_THERM_CEIL) therm_ceil = MAX_THERM_CEIL;
}
diff --git a/spaghetti-monster/anduril/tempcheck-mode.h b/spaghetti-monster/anduril/tempcheck-mode.h
index 36c41c1..83edd9c 100644
--- a/spaghetti-monster/anduril/tempcheck-mode.h
+++ b/spaghetti-monster/anduril/tempcheck-mode.h
@@ -24,7 +24,7 @@
uint8_t tempcheck_state(Event event, uint16_t arg);
uint8_t thermal_config_state(Event event, uint16_t arg);
-void thermal_config_save();
+void thermal_config_save(uint8_t step, uint8_t value);
#endif