diff options
| author | Selene ToyKeeper | 2022-07-29 21:21:36 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2022-07-29 21:21:36 -0600 |
| commit | 8b44161020b549771e5cbf0345388e5aaa5af01e (patch) | |
| tree | 88a080315063c85f2f716e02025b473b7046a10c /spaghetti-monster/fsm-ramping.c | |
| parent | added Emisar D1v2 models (old FET+7135, new linear+FET, new linear-only) (diff) | |
| download | anduril-8b44161020b549771e5cbf0345388e5aaa5af01e.tar.gz anduril-8b44161020b549771e5cbf0345388e5aaa5af01e.tar.bz2 anduril-8b44161020b549771e5cbf0345388e5aaa5af01e.zip | |
allow supporting single-color and RGB side button in the same build
(new D1v2 comes in both flavors, and it's easier for everyone if
they can use the same firmware)
Also, removed lockout-abort bug on D1v2 (and DM11, I think).
Hopefully some day I'll have time to update to a newer compiler,
and then hopefully it won't have this issue any more... but for now,
it still uses a kludge to trick the compiler into working.
Diffstat (limited to '')
| -rw-r--r-- | spaghetti-monster/fsm-ramping.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 1667c00..63692c8 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -43,14 +43,19 @@ void set_level(uint8_t level) { #endif #ifdef USE_INDICATOR_LED_WHILE_RAMPING + // use side-facing aux LEDs while main LEDs are on + if (! go_to_standby) { #ifdef USE_INDICATOR_LED - if (! go_to_standby) indicator_led((level > 0) + (level > DEFAULT_LEVEL)); #endif + #ifdef USE_BUTTON_LED + button_led_set((level > 0) + (level > DEFAULT_LEVEL)); + #endif + } //if (level > MAX_1x7135) indicator_led(2); //else if (level > 0) indicator_led(1); //else if (! go_to_standby) indicator_led(0); - #else + #else // turn off front-facing aux LEDs while main LEDs are on #if defined(USE_INDICATOR_LED) || defined(USE_AUX_RGB_LEDS) if (! go_to_standby) { #ifdef USE_INDICATOR_LED |
