aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-12-22 10:38:47 -0700
committerSelene ToyKeeper2018-12-22 10:38:47 -0700
commit7c5d1fa5627ac58d954147e453965402ea61a5bb (patch)
tree190421547f2b8fa2ad87f3ca6e1da56d7c1e98a5
parentmerged include-fix branch, cleans up how include files / config files get pul... (diff)
downloadanduril-7c5d1fa5627ac58d954147e453965402ea61a5bb.tar.gz
anduril-7c5d1fa5627ac58d954147e453965402ea61a5bb.tar.bz2
anduril-7c5d1fa5627ac58d954147e453965402ea61a5bb.zip
Turn off at beginning of 3rd click, not 2nd click. Makes off-to-ceiling transition smoother.
-rw-r--r--spaghetti-monster/anduril/anduril.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index 85390e2..a0d587b 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -394,11 +394,6 @@ uint8_t off_state(Event event, uint16_t arg) {
set_state(steady_state, memorized_level);
return MISCHIEF_MANAGED;
}
- // 2 clicks (initial press): off, to prep for later events
- else if (event == EV_click2_press) {
- set_level(0);
- return MISCHIEF_MANAGED;
- }
// click, hold: go to highest level (ceiling) (for ramping down)
else if (event == EV_click2_hold) {
set_state(steady_state, MAX_LEVEL);
@@ -409,6 +404,11 @@ uint8_t off_state(Event event, uint16_t arg) {
set_state(steady_state, MAX_LEVEL);
return MISCHIEF_MANAGED;
}
+ // 3 clicks (initial press): off, to prep for later events
+ else if (event == EV_click3_press) {
+ set_level(0);
+ return MISCHIEF_MANAGED;
+ }
#ifdef USE_BATTCHECK
// 3 clicks: battcheck mode / blinky mode group 1
else if (event == EV_3clicks) {
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.