aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-01-12 15:51:56 -0700
committerSelene ToyKeeper2019-01-12 15:51:56 -0700
commita5d824071d0152afb085f71301251c8ba455c361 (patch)
tree038fbcd9ef71015428411159220721b8f5f81eb7
parentSmall updates to the manual. (diff)
downloadanduril-a5d824071d0152afb085f71301251c8ba455c361.tar.gz
anduril-a5d824071d0152afb085f71301251c8ba455c361.tar.bz2
anduril-a5d824071d0152afb085f71301251c8ba455c361.zip
Added an option for a "fancy" moon mode during lockout. 2nd click goes to the other ramp's floor level.
-rw-r--r--spaghetti-monster/anduril/anduril.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index 4816fcd..09c7927 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -192,6 +192,8 @@ uint8_t beacon_state(Event event, uint16_t arg);
uint8_t beacon_config_state(Event event, uint16_t arg);
// soft lockout
#define MOON_DURING_LOCKOUT_MODE
+// if enabled, 2nd lockout click goes to the other ramp's floor level
+//#define LOCKOUT_MOON_FANCY
uint8_t lockout_state(Event event, uint16_t arg);
// momentary / signalling mode
uint8_t momentary_state(Event event, uint16_t arg);
@@ -1111,6 +1113,13 @@ uint8_t lockout_state(Event event, uint16_t arg) {
uint8_t lvl = ramp_smooth_floor;
if (ramp_discrete_floor < lvl) lvl = ramp_discrete_floor;
set_level(lvl);
+ #elif defined(LOCKOUT_MOON_FANCY)
+ uint8_t levels[] = { ramp_smooth_floor, ramp_discrete_floor };
+ if ((event & 0x0f) == 2) {
+ set_level(levels[ramp_style^1]);
+ } else {
+ set_level(levels[ramp_style]);
+ }
#else
// Use moon from current ramp
set_level(nearest_level(1));
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.