aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-08-09 10:31:45 -0600
committerSelene ToyKeeper2020-08-09 10:31:45 -0600
commitdcfabb7ad335568b375217991f2b64d9393f0363 (patch)
tree2599b2736a97e9461de7566e42d0f83cde5571f6 /spaghetti-monster
parentAdded a reference table to the manual, listing all button mappings (diff)
downloadanduril-dcfabb7ad335568b375217991f2b64d9393f0363.tar.gz
anduril-dcfabb7ad335568b375217991f2b64d9393f0363.tar.bz2
anduril-dcfabb7ad335568b375217991f2b64d9393f0363.zip
remapped "Off -> 2H" to momentary ceiling
(instead of going to ceiling in ramp mode, and ramping down)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril-manual.txt6
-rw-r--r--spaghetti-monster/anduril/off-mode.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt
index b415972..82a76a9 100644
--- a/spaghetti-monster/anduril/anduril-manual.txt
+++ b/spaghetti-monster/anduril/anduril-manual.txt
@@ -113,7 +113,8 @@ There are four ways to access ramping mode when the light is off:
- 1H: Turn on at the floor level. Let go after the light turns on to
stay at the floor level, or keep holding to ramp up.
- 2C: Turn on at the ceiling level.
- - 2H: Turn on at the ceiling level, then ramp down.
+ - 2H: Turn on at the ceiling level, turn off when released.
+ (momentary high mode)
While the light is on, a few basic actions are available:
@@ -565,7 +566,7 @@ Mode UI Button Action
Off Any 1C On (ramp mode, memorized level)
Off Any 1H On (ramp mode, floor level)
Off Any 2C On (ramp mode, ceiling level)
-Off Any 2H On (ramp mode, ceiling level, then ramp down)
+Off Any 2H On (momentary ceiling level)
Off Any 3C Lockout mode
Off Full 3H Strobe mode (whichever was used last)
Off Any 4C Battcheck mode
@@ -602,6 +603,7 @@ Lockout Full 7H Aux LEDs: Next color
Strobe (any) Full 1C Off
Strobe (any) Full 2C Next strobe mode
+Strobe (any) Full 3H Tint ramping (on some lights)
Strobe (any) Full 5C Momentary mode (using current strobe)
Candle Full 1H/2H Brighter / dimmer
diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c
index fafc8b2..4284b08 100644
--- a/spaghetti-monster/anduril/off-mode.c
+++ b/spaghetti-monster/anduril/off-mode.c
@@ -136,9 +136,13 @@ uint8_t off_state(Event event, uint16_t arg) {
set_state(steady_state, memorized_level);
return MISCHIEF_MANAGED;
}
- // click, hold: go to highest level (ceiling) (for ramping down)
+ // click, hold: momentary at ceiling level
else if (event == EV_click2_hold) {
- set_state(steady_state, MAX_LEVEL);
+ set_level(nearest_level(MAX_LEVEL));
+ return MISCHIEF_MANAGED;
+ }
+ else if (event == EV_click2_hold_release) {
+ set_level(0);
return MISCHIEF_MANAGED;
}
// 2 clicks: highest mode (ceiling)
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.