From 7d383475d5b7c0edaabce3665dd880425d51a24d Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Wed, 13 Apr 2022 10:13:45 -0500 Subject: Created LED_DISABLE_DELAY option and enabled it for SP10 Pro to hopefully eliminate flashes when turning off at certain levels --- spaghetti-monster/anduril/version.h | 2 +- spaghetti-monster/fsm-ramping.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index 9f811f4..4e20d1d 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1 +1 @@ -#define VERSION_NUMBER "20220411" +#define VERSION_NUMBER "20220413" diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 1f575fd..2e6901d 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -93,6 +93,10 @@ void set_level(uint8_t level) { TINT1_LVL = 0; TINT2_LVL = 0; #endif + // for drivers with a slow regulator chip (eg, boost converter, delay before turning off to prevent flashes + #ifdef LED_DISABLE_DELAY + delay_4ms(LED_DISABLE_DELAY/4); + #endif // disable the power channel, if relevant #ifdef LED_ENABLE_PIN LED_ENABLE_PORT &= ~(1 << LED_ENABLE_PIN); -- cgit v1.2.3