mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Fix builds when PWM motor protocol is used (#13236)
* Fix builds when PWM motor protocol is used * Enable useUnsyncedPwm for PWM by default
This commit is contained in:
parent
a39ae3c89c
commit
b3be3edb0b
4 changed files with 5 additions and 4 deletions
|
@ -61,6 +61,9 @@ void pgResetFn_motorConfig(motorConfig_t *motorConfig)
|
|||
motorConfig->minthrottle = 1070;
|
||||
motorConfig->dev.motorPwmRate = BRUSHLESS_MOTORS_PWM_RATE;
|
||||
#ifndef USE_DSHOT
|
||||
if (motorConfig->dev.motorPwmProtocol == PWM_TYPE_STANDARD) {
|
||||
motorConfig->dev.useUnsyncedPwm = true;
|
||||
}
|
||||
motorConfig->dev.motorPwmProtocol = PWM_TYPE_DISABLED;
|
||||
#elif defined(DEFAULT_MOTOR_DSHOT_SPEED)
|
||||
motorConfig->dev.motorPwmProtocol = DEFAULT_MOTOR_DSHOT_SPEED;
|
||||
|
|
|
@ -75,8 +75,6 @@
|
|||
|
||||
#define USE_ADC
|
||||
|
||||
#define USE_PWM_OUTPUT
|
||||
|
||||
// Remove these undefines as support is added
|
||||
//#undef USE_BEEPER
|
||||
//#undef USE_LED_STRIP
|
||||
|
|
|
@ -75,8 +75,6 @@
|
|||
|
||||
#define USE_ADC
|
||||
|
||||
#define USE_PWM_OUTPUT
|
||||
|
||||
// Remove these undefines as support is added
|
||||
//#undef USE_BEEPER
|
||||
//#undef USE_LED_STRIP
|
||||
|
|
|
@ -99,7 +99,9 @@
|
|||
|
||||
#define USE_PARAMETER_GROUPS
|
||||
|
||||
#ifndef USE_PWM_OUTPUT
|
||||
#define USE_PWM_OUTPUT
|
||||
#endif
|
||||
|
||||
#undef USE_STACK_CHECK // I think SITL don't need this
|
||||
#undef USE_DASHBOARD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue