1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

workaround for AUX1-4 PWM signals missing on PWM5-8 outputs when LED_STRIP is enabled on NAZE32

This commit is contained in:
Rimas Avizienis 2015-03-25 12:35:02 -07:00
parent 4e07899a06
commit 56167eb0d2

View file

@ -455,9 +455,17 @@ pwmOutputConfiguration_t *pwmInit(drv_pwm_config_t *init)
}
if (init->extraServos && !init->airplane) {
// remap PWM5..8 as servos when used in extended servo mode
if (timerIndex >= PWM5 && timerIndex <= PWM8)
type = MAP_TO_SERVO_OUTPUT;
#if defined(NAZE) && defined(LED_STRIP_TIMER)
// if LED strip is active, PWM5-8 are unavailable, so map AUX1+AUX2 to PWM13+PWM14
if (init->useLEDStrip) {
if (timerIndex >= PWM13 && timerIndex <= PWM14) {
type = MAP_TO_SERVO_OUTPUT;
}
} else
#endif
// remap PWM5..8 as servos when used in extended servo mode
if (timerIndex >= PWM5 && timerIndex <= PWM8)
type = MAP_TO_SERVO_OUTPUT;
}
#endif