aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-09-14 02:32:08 -0600
committerSelene ToyKeeper2020-09-14 02:32:08 -0600
commit64fe494434cb8e2afe0882bbd8a83e1d1e4497b4 (patch)
treeb49444afc47140393ed869a68a82ea44695cf2c1
parentadded model numbers to each build target, and to version check function (diff)
downloadanduril-64fe494434cb8e2afe0882bbd8a83e1d1e4497b4.tar.gz
anduril-64fe494434cb8e2afe0882bbd8a83e1d1e4497b4.tar.bz2
anduril-64fe494434cb8e2afe0882bbd8a83e1d1e4497b4.zip
fixed bug: ramp 2H at floor went up instead of staying at floor
(thanks to SammysHP for suggesting this fix)
-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 93f0d36..90c7368 100644
--- a/spaghetti-monster/anduril/ramp-mode.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -142,13 +142,13 @@ uint8_t steady_state(Event event, uint16_t arg) {
}
// fix ramp direction on first frame if necessary
if (!arg) {
+ // click, hold should always go down if possible
+ if (event == EV_click2_hold) { ramp_direction = -1; }
// make it ramp down instead, if already at max
- if (actual_level >= mode_max) { ramp_direction = -1; }
+ else if (actual_level >= mode_max) { ramp_direction = -1; }
// make it ramp up if already at min
// (off->hold->stepped_min->release causes this state)
else if (actual_level <= mode_min) { ramp_direction = 1; }
- // click, hold should always go down if possible
- else if (event == EV_click2_hold) { ramp_direction = -1; }
}
// if the button is stuck, err on the side of safety and ramp down
else if ((arg > TICKS_PER_SECOND * 5) && (actual_level >= mode_max)) {
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.