diff options
Diffstat (limited to 'spaghetti-monster')
26 files changed, 15 insertions, 107 deletions
diff --git a/spaghetti-monster/anduril/aux-leds.c b/spaghetti-monster/anduril/aux-leds.c index 73d163e..3195fdc 100644 --- a/spaghetti-monster/anduril/aux-leds.c +++ b/spaghetti-monster/anduril/aux-leds.c @@ -29,15 +29,9 @@ void indicator_blink(uint8_t arg) { // turn off aux LEDs when battery is empty if (voltage < VOLTAGE_LOW) { indicator_led(0); return; } - #ifdef USE_FANCIER_BLINKING_INDICATOR - - // fancy blink, set off/low/high levels here: - static const uint8_t seq[] = {0, 1, 2, 1, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0}; - indicator_led(seq[arg & 15]); - - #else // basic blink, 1/8th duty cycle + #ifdef USE_OLD_BLINKING_INDICATOR + // basic blink, 1/8th duty cycle if (! (arg & 7)) { indicator_led(2); } @@ -45,7 +39,14 @@ void indicator_blink(uint8_t arg) { indicator_led(0); } - #endif + #else + + // fancy blink, set off/low/high levels here: + static const uint8_t seq[] = {0, 1, 2, 1, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0}; + indicator_led(seq[arg & 15]); + + #endif // ifdef USE_OLD_BLINKING_INDICATOR } #endif diff --git a/spaghetti-monster/anduril/aux-leds.h b/spaghetti-monster/anduril/aux-leds.h index 94dc3c0..664cbf1 100644 --- a/spaghetti-monster/anduril/aux-leds.h +++ b/spaghetti-monster/anduril/aux-leds.h @@ -65,6 +65,8 @@ uint8_t rgb_led_off_mode = RGB_LED_OFF_DEFAULT; uint8_t rgb_led_lockout_mode = RGB_LED_LOCKOUT_DEFAULT; #endif +//#define USE_OLD_BLINKING_INDICATOR +//#define USE_FANCIER_BLINKING_INDICATOR #ifdef USE_INDICATOR_LED // bits 2-3 control lockout mode // bits 0-1 control "off" mode diff --git a/spaghetti-monster/anduril/cfg-blf-gt-mini.h b/spaghetti-monster/anduril/cfg-blf-gt-mini.h index 45dfe36..af16f2c 100644 --- a/spaghetti-monster/anduril/cfg-blf-gt-mini.h +++ b/spaghetti-monster/anduril/cfg-blf-gt-mini.h @@ -9,6 +9,4 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY diff --git a/spaghetti-monster/anduril/cfg-blf-gt.h b/spaghetti-monster/anduril/cfg-blf-gt.h index 061685c..7f880dd 100644 --- a/spaghetti-monster/anduril/cfg-blf-gt.h +++ b/spaghetti-monster/anduril/cfg-blf-gt.h @@ -6,8 +6,6 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY // don't blink during ramp, it's irrelevant and annoying on this light #undef BLINK_AT_RAMP_CEIL diff --git a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h index d602641..51c3d6a 100644 --- a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h +++ b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h @@ -13,10 +13,6 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // off mode: high (2) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h index 6be8ec7..28c7dbb 100644 --- a/spaghetti-monster/anduril/cfg-blf-lantern.h +++ b/spaghetti-monster/anduril/cfg-blf-lantern.h @@ -16,10 +16,6 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // off mode: high (2) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) diff --git a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h index 73702a9..002e8e3 100644 --- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h +++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h @@ -7,10 +7,6 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // off mode: high (2) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) diff --git a/spaghetti-monster/anduril/cfg-blf-q8.h b/spaghetti-monster/anduril/cfg-blf-q8.h index 408c305..d4243ee 100644 --- a/spaghetti-monster/anduril/cfg-blf-q8.h +++ b/spaghetti-monster/anduril/cfg-blf-q8.h @@ -6,10 +6,6 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // off mode: high (2) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) diff --git a/spaghetti-monster/anduril/cfg-emisar-d4s.h b/spaghetti-monster/anduril/cfg-emisar-d4s.h index ef7534b..f224377 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d4s.h +++ b/spaghetti-monster/anduril/cfg-emisar-d4s.h @@ -9,10 +9,6 @@ #ifdef USE_INDICATOR_LED_WHILE_RAMPING #undef USE_INDICATOR_LED_WHILE_RAMPING #endif -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR #ifdef RAMP_LENGTH #undef RAMP_LENGTH diff --git a/spaghetti-monster/anduril/cfg-emisar-d4sv2.h b/spaghetti-monster/anduril/cfg-emisar-d4sv2.h index df49532..5f18fbc 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d4sv2.h +++ b/spaghetti-monster/anduril/cfg-emisar-d4sv2.h @@ -10,11 +10,6 @@ #ifdef USE_INDICATOR_LED_WHILE_RAMPING #undef USE_INDICATOR_LED_WHILE_RAMPING #endif -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -//#define STANDBY_TICK_SPEED 4 // every 0.256 s -//#define STANDBY_TICK_SPEED 5 // every 0.512 s // 1x7135 + 3x7135 + FET diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2.h b/spaghetti-monster/anduril/cfg-emisar-d4v2.h index 9759c0e..4121465 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d4v2.h +++ b/spaghetti-monster/anduril/cfg-emisar-d4v2.h @@ -14,11 +14,6 @@ #ifdef USE_INDICATOR_LED_WHILE_RAMPING #undef USE_INDICATOR_LED_WHILE_RAMPING #endif -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -//#define STANDBY_TICK_SPEED 4 // every 0.256 s -//#define STANDBY_TICK_SPEED 5 // every 0.512 s // copied from original D4, since it's also a FET+1 and has the same host diff --git a/spaghetti-monster/anduril/cfg-ff-pl47.h b/spaghetti-monster/anduril/cfg-ff-pl47.h index 1bb6a2f..1d46801 100644 --- a/spaghetti-monster/anduril/cfg-ff-pl47.h +++ b/spaghetti-monster/anduril/cfg-ff-pl47.h @@ -9,10 +9,7 @@ #undef USE_INDICATOR_LED_WHILE_RAMPING #endif //#define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off? -#define TICK_DURING_STANDBY -// If TICK_DURING_STANDBY is enabled... // off mode: high (2) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) @@ -22,11 +19,6 @@ // Fireflies wants to skip aux LED mode 1 (low) #define INDICATOR_LED_SKIP_LOW -// ... or if TICK_DURING_STANDBY is turned off: -// off mode: high (2) -// lockout: off (0) -//#define INDICATOR_LED_DEFAULT_MODE ((0<<2) + 2) - #define RAMP_LENGTH 150 diff --git a/spaghetti-monster/anduril/cfg-ff-pl47g2.h b/spaghetti-monster/anduril/cfg-ff-pl47g2.h index 7e63ec3..8d80555 100644 --- a/spaghetti-monster/anduril/cfg-ff-pl47g2.h +++ b/spaghetti-monster/anduril/cfg-ff-pl47g2.h @@ -8,12 +8,7 @@ #ifdef USE_INDICATOR_LED_WHILE_RAMPING #undef USE_INDICATOR_LED_WHILE_RAMPING #endif -// enable blinking indicator LED while off? -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR -// If TICK_DURING_STANDBY is enabled... // off mode: low (1) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) diff --git a/spaghetti-monster/anduril/cfg-ff-rot66.h b/spaghetti-monster/anduril/cfg-ff-rot66.h index 9922681..652c98b 100644 --- a/spaghetti-monster/anduril/cfg-ff-rot66.h +++ b/spaghetti-monster/anduril/cfg-ff-rot66.h @@ -6,18 +6,10 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off? -//#define TICK_DURING_STANDBY -// If TICK_DURING_STANDBY is enabled... // off mode: high (2) // lockout: blinking (3) -//#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) - -// ... or if TICK_DURING_STANDBY is turned off: -// off mode: high (2) -// lockout: off (0) -#define INDICATOR_LED_DEFAULT_MODE ((0<<2) + 2) +#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) // driver is a FET+N+1, diff --git a/spaghetti-monster/anduril/cfg-ff-rot66g2.h b/spaghetti-monster/anduril/cfg-ff-rot66g2.h index 9a70498..9737cc4 100644 --- a/spaghetti-monster/anduril/cfg-ff-rot66g2.h +++ b/spaghetti-monster/anduril/cfg-ff-rot66g2.h @@ -7,10 +7,6 @@ #ifdef INDICATOR_LED_SKIP_LOW #undef INDICATOR_LED_SKIP_LOW #endif -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // lockout: blinking (3), off: low (1) #ifdef INDICATOR_LED_DEFAULT_MODE diff --git a/spaghetti-monster/anduril/cfg-fw3x-lume1.h b/spaghetti-monster/anduril/cfg-fw3x-lume1.h index 818fb9d..2f90920 100644 --- a/spaghetti-monster/anduril/cfg-fw3x-lume1.h +++ b/spaghetti-monster/anduril/cfg-fw3x-lume1.h @@ -28,12 +28,6 @@ #undef USE_INDICATOR_LED_WHILE_RAMPING #endif -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -//#define STANDBY_TICK_SPEED 4 // every 0.256 s -//#define STANDBY_TICK_SPEED 5 // every 0.512 s - // ../../bin/level_calc.py cube 1 149 7135 0 0.5 1000, with 0 appended to the end. // for FET PWM (PWM2), all values are 0, except for last value of 1023 // (with max_pwm set to 1023) diff --git a/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h index 101f25a..192307e 100644 --- a/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h +++ b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h @@ -7,10 +7,6 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // off mode: low (1) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) diff --git a/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h b/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h index c66525c..de5da88 100644 --- a/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h +++ b/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h @@ -7,10 +7,6 @@ //#define INDICATOR_LED_SKIP_LOW // low mode doesn't work on this driver // the button is visible while main LEDs are on //#define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // off mode: low (1) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) diff --git a/spaghetti-monster/anduril/cfg-mateminco-mf01s.h b/spaghetti-monster/anduril/cfg-mateminco-mf01s.h index 9a8b641..b1f3b6e 100644 --- a/spaghetti-monster/anduril/cfg-mateminco-mf01s.h +++ b/spaghetti-monster/anduril/cfg-mateminco-mf01s.h @@ -6,10 +6,6 @@ #define USE_INDICATOR_LED // the button is visible while main LEDs are on //#define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking indicator LED while off -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s -#define USE_FANCIER_BLINKING_INDICATOR // off mode: low (1) // lockout: blinking (3) #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h b/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h index 25add17..7f8f4cf 100644 --- a/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h +++ b/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h @@ -17,10 +17,6 @@ #define USE_AUX_RGB_LEDS_WHILE_ON #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s - // level_calc.py cube 1 150 7135 0 4 1300 // (with max_pwm set to 1023) diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h b/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h index ca6a9d1..9207dbc 100644 --- a/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h +++ b/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h @@ -14,10 +14,6 @@ #define USE_AUX_RGB_LEDS_WHILE_ON #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s - // brightness: // 0/1023: 0.35 lm diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1.h b/spaghetti-monster/anduril/cfg-noctigon-k1.h index 0baafc0..fb2a89c 100644 --- a/spaghetti-monster/anduril/cfg-noctigon-k1.h +++ b/spaghetti-monster/anduril/cfg-noctigon-k1.h @@ -14,10 +14,6 @@ #define USE_AUX_RGB_LEDS_WHILE_ON #define USE_INDICATOR_LED_WHILE_RAMPING -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s - // ../../bin/level_calc.py cube 1 150 7135 1 4 1300 // (with max_pwm set to 1023) diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3.h index 4ae859a..f3a6cdd 100644 --- a/spaghetti-monster/anduril/cfg-noctigon-k9.3.h +++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3.h @@ -23,10 +23,6 @@ inline void set_level_override(uint8_t level); #undef USE_INDICATOR_LED_WHILE_RAMPING #endif -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s - // has two channels of independent LEDs #define USE_TINT_RAMPING // ... but it doesn't make sense to ramp between; only toggle diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4.h b/spaghetti-monster/anduril/cfg-noctigon-kr4.h index eea6a07..82b8df5 100644 --- a/spaghetti-monster/anduril/cfg-noctigon-kr4.h +++ b/spaghetti-monster/anduril/cfg-noctigon-kr4.h @@ -18,10 +18,6 @@ #undef USE_INDICATOR_LED_WHILE_RAMPING #endif -// enable blinking aux LEDs -#define TICK_DURING_STANDBY -#define STANDBY_TICK_SPEED 3 // every 0.128 s - // brightness w/ SST-20 4000K LEDs: // 0/1023: 0.35 lm diff --git a/spaghetti-monster/fireflies-ui/fireflies-ui.c b/spaghetti-monster/fireflies-ui/fireflies-ui.c index 2c3e60b..93a3180 100644 --- a/spaghetti-monster/fireflies-ui/fireflies-ui.c +++ b/spaghetti-monster/fireflies-ui/fireflies-ui.c @@ -2107,6 +2107,7 @@ void blip() { #if defined(USE_INDICATOR_LED) && defined(TICK_DURING_STANDBY) // beacon-like mode for the indicator LED void indicator_blink(uint8_t arg) { + #define USE_FANCIER_BLINKING_INDICATOR #ifdef USE_FANCIER_BLINKING_INDICATOR // fancy blink, set off/low/high levels here: diff --git a/spaghetti-monster/rampingios/rampingiosv3.c b/spaghetti-monster/rampingios/rampingiosv3.c index 7f03e77..7b6baee 100644 --- a/spaghetti-monster/rampingios/rampingiosv3.c +++ b/spaghetti-monster/rampingios/rampingiosv3.c @@ -1106,6 +1106,7 @@ void blink_confirm(uint8_t num) { #if defined(USE_INDICATOR_LED) && defined(TICK_DURING_STANDBY) // beacon-like mode for the indicator LED void indicator_blink(uint8_t arg) { + #define USE_FANCIER_BLINKING_INDICATOR #ifdef USE_FANCIER_BLINKING_INDICATOR // fancy blink, set off/low/high levels here: |
