From 7489f72a8eedf89be0052ebf72e9a1e41aa5ed78 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 8 Sep 2021 21:40:27 -0600 Subject: got BLF LT1 working again, using new tint-ramping code --- spaghetti-monster/fsm-main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spaghetti-monster/fsm-main.c') diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c index f3c319c..7031009 100644 --- a/spaghetti-monster/fsm-main.c +++ b/spaghetti-monster/fsm-main.c @@ -47,7 +47,9 @@ static inline void hw_setup() { TCCR0B = 0x01; // pre-scaler for timer (1 => 1, 2 => 8, 3 => 64...) TCCR0A = PHASE; #endif - #if PWM_CHANNELS >= 2 + // tint ramping needs second channel enabled, + // despite PWM_CHANNELS being only 1 + #if (PWM_CHANNELS >= 2) || defined(USE_TINT_RAMPING) DDRB |= (1 << PWM2_PIN); #endif #if PWM_CHANNELS >= 3 -- cgit v1.2.3