aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-08-23 17:11:50 -0600
committerSelene ToyKeeper2017-08-23 17:11:50 -0600
commiteabfc98408e6541c2e2bcce29e2cef4214d63a56 (patch)
tree91a05fdb847c74b4ed88fcaaa00b5d6ff405cf24
parentAdded missing returns, made strobe-from-off use memorized strobe speed, (diff)
downloadanduril-eabfc98408e6541c2e2bcce29e2cef4214d63a56.tar.gz
anduril-eabfc98408e6541c2e2bcce29e2cef4214d63a56.tar.bz2
anduril-eabfc98408e6541c2e2bcce29e2cef4214d63a56.zip
Added LVP to Baton UI. Was super easy.
-rw-r--r--spaghetti-monster/baton.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/spaghetti-monster/baton.c b/spaghetti-monster/baton.c
index 194dbec..559eb48 100644
--- a/spaghetti-monster/baton.c
+++ b/spaghetti-monster/baton.c
@@ -171,7 +171,19 @@ uint8_t party_strobe_state(EventPtr event, uint16_t arg) {
}
void low_voltage() {
- // FIXME: do something
+ // "step down" from strobe to level 2
+ if (current_state == party_strobe_state) {
+ set_state(steady_state, 1);
+ }
+ // in normal mode, step down by one level or turn off
+ else if (current_state == steady_state) {
+ if (actual_level > 0) {
+ set_mode(actual_level - 1);
+ }
+ else {
+ set_state(off_state, 0);
+ }
+ }
}
void setup() {
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.