1
0
Fork 0
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:
Mark Haslinghuis 2023-12-24 13:56:14 +01:00 committed by GitHub
parent a39ae3c89c
commit b3be3edb0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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