aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-ramping.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-05-30 06:12:18 -0600
committerSelene ToyKeeper2023-05-30 06:12:18 -0600
commit6415a13625eadb2793b888c3fa2c92e115b9a335 (patch)
tree737687a8f38e1f19392f729867da4dcd227d3b9c /spaghetti-monster/fsm-ramping.h
parentfixed bug: regulated down on some lights when not hot (diff)
downloadanduril-6415a13625eadb2793b888c3fa2c92e115b9a335.tar.gz
anduril-6415a13625eadb2793b888c3fa2c92e115b9a335.tar.bz2
anduril-6415a13625eadb2793b888c3fa2c92e115b9a335.zip
gradual adjustments: handle 0-to-255 in one step on the way up too, not just down
Diffstat (limited to 'spaghetti-monster/fsm-ramping.h')
-rw-r--r--spaghetti-monster/fsm-ramping.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-ramping.h b/spaghetti-monster/fsm-ramping.h
index 8d5ed27..36cf89c 100644
--- a/spaghetti-monster/fsm-ramping.h
+++ b/spaghetti-monster/fsm-ramping.h
@@ -115,7 +115,7 @@ void gradual_tick();
#define GRADUAL_ADJUST_STACKED(TARGET,PWM,TOP) \
if ( ((PWM == 0) && (TARGET == TOP)) \
|| ((PWM == TOP) && (TARGET == 0))) \
- PWM = TOP; \
+ PWM = TARGET; \
else GRADUAL_ADJUST_SIMPLE(TARGET,PWM)
// tick the top layer of the stack