From a650fcfa5f1e81a25a9879b25cbb48cc04327b44 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 24 Sep 2020 09:06:27 -0600 Subject: fixed bug: zero clicks in ceiling config set ceiling to nonsense value --- spaghetti-monster/anduril/ramp-mode.c | 6 +++--- 1 file 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?) -- cgit v1.2.3