aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/fsm-ramping.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c
index ee72cd7..49e173f 100644
--- a/spaghetti-monster/fsm-ramping.c
+++ b/spaghetti-monster/fsm-ramping.c
@@ -102,6 +102,7 @@ void set_level(uint8_t level) {
#endif
} else {
// enable the power channel, if relevant
+ #ifndef USE_TINT_RAMPING // update_tint handles this better
#ifdef LED_ENABLE_PIN
#ifndef LED_ENABLE_PIN_LEVEL_MIN
LED_ENABLE_PORT |= (1 << LED_ENABLE_PIN);
@@ -117,6 +118,7 @@ void set_level(uint8_t level) {
#ifdef LED2_ENABLE_PIN
LED2_ENABLE_PORT |= (1 << LED2_ENABLE_PIN);
#endif
+ #endif // ifndef USE_TINT_RAMPING
// PWM array index = level - 1
level --;
@@ -354,11 +356,15 @@ void update_tint() {
// disable the power channel, if relevant
#ifdef LED_ENABLE_PIN
- if (! warm_PWM)
+ if (warm_PWM)
+ LED_ENABLE_PORT |= (1 << LED_ENABLE_PIN);
+ else
LED_ENABLE_PORT &= ~(1 << LED_ENABLE_PIN);
#endif
#ifdef LED2_ENABLE_PIN
- if (! cool_PWM)
+ if (cool_PWM)
+ LED2_ENABLE_PORT |= (1 << LED2_ENABLE_PIN);
+ else
LED2_ENABLE_PORT &= ~(1 << LED2_ENABLE_PIN);
#endif
}
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.