aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/version.h2
-rw-r--r--spaghetti-monster/fsm-ramping.c12
2 files changed, 12 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h
index ff0abc7..c67379c 100644
--- a/spaghetti-monster/anduril/version.h
+++ b/spaghetti-monster/anduril/version.h
@@ -1 +1 @@
-#define VERSION_NUMBER "20220104"
+#define VERSION_NUMBER "20220105"
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c
index 89e1f13..6bb2390 100644
--- a/spaghetti-monster/fsm-ramping.c
+++ b/spaghetti-monster/fsm-ramping.c
@@ -125,7 +125,17 @@ void set_level(uint8_t level) {
#endif
#endif
#ifdef LED2_ENABLE_PIN
- LED2_ENABLE_PORT |= (1 << LED2_ENABLE_PIN);
+ #ifdef LED2_ENABLE_DELAY
+ uint8_t led2_enable_port_save = LED2_ENABLE_PORT;
+ #endif
+
+ LED2_ENABLE_PORT |= (1 << LED2_ENABLE_PIN);
+
+ // for drivers with a slow regulator chip (eg, boost converter, delay before lighting up to prevent flashes
+ #ifdef LED2_ENABLE_DELAY
+ if (LED2_ENABLE_PORT != led2_enable_port_save) // only delay if the pin status changed
+ delay_4ms(LED2_ENABLE_DELAY/4);
+ #endif
#endif
// PWM array index = level - 1
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.