aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-main.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-09-08 21:40:27 -0600
committerSelene ToyKeeper2021-09-08 21:40:27 -0600
commit7489f72a8eedf89be0052ebf72e9a1e41aa5ed78 (patch)
tree100c43d23cc39406975183c1882f3f15531eb1c4 /spaghetti-monster/fsm-main.c
parentfixed D4Sv2-tintramp PWM_TOP (should be set to the value it needs during ther... (diff)
downloadanduril-7489f72a8eedf89be0052ebf72e9a1e41aa5ed78.tar.gz
anduril-7489f72a8eedf89be0052ebf72e9a1e41aa5ed78.tar.bz2
anduril-7489f72a8eedf89be0052ebf72e9a1e41aa5ed78.zip
got BLF LT1 working again, using new tint-ramping code
Diffstat (limited to 'spaghetti-monster/fsm-main.c')
-rw-r--r--spaghetti-monster/fsm-main.c4
1 files changed, 3 insertions, 1 deletions
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