aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c
index 695c3a2..b2c5102 100644
--- a/spaghetti-monster/anduril/ramp-mode.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -410,11 +410,11 @@ void ramp_config_save(uint8_t step, uint8_t value) {
uint8_t style = ramp_style;
if (current_state == simple_ui_config_state) style = 2;
- // ceiling value is inverted
- if (step == 2) value = MAX_LEVEL + 1 - value;
-
// save adjusted value to the correct slot
if (value) {
+ // ceiling value is inverted
+ if (step == 2) value = MAX_LEVEL + 1 - 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?)
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.