diff options
| author | Selene ToyKeeper | 2020-05-14 19:09:02 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-05-14 19:09:02 -0600 |
| commit | ea1e6af54193a119c96af313c99fac25af917cb8 (patch) | |
| tree | a4adccdbdc94c4be8a1ef36fe5696d9bee3c6efb | |
| parent | gave Werner's UI a simple Makefile (diff) | |
| download | anduril-ea1e6af54193a119c96af313c99fac25af917cb8.tar.gz anduril-ea1e6af54193a119c96af313c99fac25af917cb8.tar.bz2 anduril-ea1e6af54193a119c96af313c99fac25af917cb8.zip | |
fixed compile error when all strobe modes are disabled
| -rw-r--r-- | spaghetti-monster/anduril/anduril.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index a23b2e1..167c14d 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -1854,9 +1854,11 @@ uint8_t momentary_state(Event event, uint16_t arg) { // TODO: momentary strobe here? (for light painting) // init strobe mode, if relevant + #ifdef USE_STROBE_STATE if ((event == EV_enter_state) && (momentary_mode == 1)) { strobe_state(event, arg); } + #endif // light up when the button is pressed; go dark otherwise // button is being held @@ -1882,6 +1884,7 @@ uint8_t momentary_state(Event event, uint16_t arg) { // disconnected for several seconds, so we want to be awake when that // happens to speed up the process) else if (event == EV_tick) { + #ifdef USE_STROBE_STATE if (momentary_active) { // 0 = ramping, 1 = strobes if (momentary_mode == 1) { @@ -1889,6 +1892,7 @@ uint8_t momentary_state(Event event, uint16_t arg) { } } else { + #endif if (arg > TICKS_PER_SECOND*5) { // sleep after 5 seconds go_to_standby = 1; // sleep while light is off // turn off lighted button @@ -1898,7 +1902,9 @@ uint8_t momentary_state(Event event, uint16_t arg) { rgb_led_update(0, 0); #endif } + #ifdef USE_STROBE_STATE } + #endif return MISCHIEF_MANAGED; } |
