1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

Use bitbanged DSHOT by default if dshot_bitbang = AUTO unless F4

This commit is contained in:
Steve Evans 2021-12-17 11:16:26 +00:00
parent a63172cc1f
commit f6190e2f1a

View file

@ -328,8 +328,13 @@ timeMs_t motorGetMotorEnableTimeMs(void)
#ifdef USE_DSHOT_BITBANG #ifdef USE_DSHOT_BITBANG
bool isDshotBitbangActive(const motorDevConfig_t *motorDevConfig) bool isDshotBitbangActive(const motorDevConfig_t *motorDevConfig)
{ {
#ifdef STM32F4
return motorDevConfig->useDshotBitbang == DSHOT_BITBANG_ON || return motorDevConfig->useDshotBitbang == DSHOT_BITBANG_ON ||
(motorDevConfig->useDshotBitbang == DSHOT_BITBANG_AUTO && motorDevConfig->useDshotTelemetry && motorDevConfig->motorPwmProtocol != PWM_TYPE_PROSHOT1000); (motorDevConfig->useDshotBitbang == DSHOT_BITBANG_AUTO && motorDevConfig->useDshotTelemetry && motorDevConfig->motorPwmProtocol != PWM_TYPE_PROSHOT1000);
#else
return motorDevConfig->useDshotBitbang == DSHOT_BITBANG_ON ||
(motorDevConfig->useDshotBitbang == DSHOT_BITBANG_AUTO && motorDevConfig->motorPwmProtocol != PWM_TYPE_PROSHOT1000);
#endif
} }
#endif #endif