mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Merge branch 'master' into betaflight
Conflicts: Makefile src/main/io/serial_cli.c src/main/main.c src/main/sensors/initialisation.c src/main/sensors/initialisation.h
This commit is contained in:
commit
5a1301f73d
27 changed files with 852 additions and 111 deletions
|
@ -622,12 +622,12 @@ pwmOutputConfiguration_t *pwmInit(drv_pwm_config_t *init)
|
|||
|
||||
if (type == MAP_TO_PPM_INPUT) {
|
||||
#ifdef CC3D
|
||||
if (init->useOneshot) {
|
||||
if (init->useOneshot || isMotorBrushed(init->motorPwmRate)) {
|
||||
ppmAvoidPWMTimerClash(timerHardwarePtr, TIM4);
|
||||
}
|
||||
#endif
|
||||
#ifdef SPARKY
|
||||
if (init->useOneshot) {
|
||||
if (init->useOneshot || isMotorBrushed(init->motorPwmRate)) {
|
||||
ppmAvoidPWMTimerClash(timerHardwarePtr, TIM2);
|
||||
}
|
||||
#endif
|
||||
|
@ -638,7 +638,7 @@ pwmOutputConfiguration_t *pwmInit(drv_pwm_config_t *init)
|
|||
} else if (type == MAP_TO_MOTOR_OUTPUT) {
|
||||
if (init->useOneshot) {
|
||||
pwmOneshotMotorConfig(timerHardwarePtr, pwmOutputConfiguration.motorCount);
|
||||
} else if (init->motorPwmRate > 500) {
|
||||
} else if (isMotorBrushed(init->motorPwmRate)) {
|
||||
pwmBrushedMotorConfig(timerHardwarePtr, pwmOutputConfiguration.motorCount, init->motorPwmRate, init->idlePulse);
|
||||
} else {
|
||||
pwmBrushlessMotorConfig(timerHardwarePtr, pwmOutputConfiguration.motorCount, init->motorPwmRate, init->idlePulse);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue