From 8b44161020b549771e5cbf0345388e5aaa5af01e Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 29 Jul 2022 21:21:36 -0600 Subject: 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. --- spaghetti-monster/fsm-ramping.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'spaghetti-monster/fsm-ramping.c') 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 -- cgit v1.2.3