aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-09-01 18:03:21 -0600
committerSelene ToyKeeper2018-09-01 18:03:21 -0600
commitd51163492931b248636cdb0aab0bb9df3c1c239c (patch)
treea162a50700817109120485547c31a39c2e567d28 /spaghetti-monster
parentFixed bug introduced in trunk r211.1.9, where Anduril's goodnight mode didn't... (diff)
downloadanduril-d51163492931b248636cdb0aab0bb9df3c1c239c.tar.gz
anduril-d51163492931b248636cdb0aab0bb9df3c1c239c.tar.bz2
anduril-d51163492931b248636cdb0aab0bb9df3c1c239c.zip
Reduced ROM size another 10 bytes by removing redundant call to nearest_level().
Added some comments to clarify what lowest and highest level mean.
Diffstat (limited to 'spaghetti-monster')
-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 f5c2649..bbf661d 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -375,7 +375,7 @@ uint8_t off_state(EventPtr event, uint16_t arg) {
return MISCHIEF_MANAGED;
}
#endif
- // hold (initially): go to lowest level, but allow abort for regular click
+ // hold (initially): go to lowest level (floor), but allow abort for regular click
else if (event == EV_click1_press) {
set_level(nearest_level(1));
return MISCHIEF_MANAGED;
@@ -389,7 +389,7 @@ uint8_t off_state(EventPtr event, uint16_t arg) {
}
return MISCHIEF_MANAGED;
}
- // hold, release quickly: go to lowest level
+ // hold, release quickly: go to lowest level (floor)
else if (event == EV_click1_hold_release) {
set_state(steady_state, 1);
return MISCHIEF_MANAGED;
@@ -409,14 +409,14 @@ uint8_t off_state(EventPtr event, uint16_t arg) {
set_level(0);
return MISCHIEF_MANAGED;
}
- // click, hold: go to highest level (for ramping down)
+ // click, hold: go to highest level (ceiling) (for ramping down)
else if (event == EV_click2_hold) {
set_state(steady_state, MAX_LEVEL);
return MISCHIEF_MANAGED;
}
- // 2 clicks: highest mode
+ // 2 clicks: highest mode (ceiling)
else if (event == EV_2clicks) {
- set_state(steady_state, nearest_level(MAX_LEVEL));
+ set_state(steady_state, MAX_LEVEL);
return MISCHIEF_MANAGED;
}
#ifdef USE_BATTCHECK
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.