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

Avoid high dshot lines with telemetry during startup

This commit is contained in:
Thorsten Laux 2019-05-02 15:26:00 +02:00
parent 093c2864ca
commit 51ae8d99d2
2 changed files with 8 additions and 0 deletions

View file

@ -393,6 +393,10 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
( 2 + (motor->useProshot ? 4 * MOTOR_NIBBLE_LENGTH_PROSHOT : 16 * MOTOR_BITLENGTH))
/ getDshotHz(pwmProtocolType);
pwmDshotSetDirectionOutput(motor, true);
if (useDshotTelemetry) {
// avoid high line during startup to prevent bootloader activation
*timerChCCR(timerHardware) = 0xffff;
}
#else
pwmDshotSetDirectionOutput(motor, true, &OCINIT, &DMAINIT);
#endif

View file

@ -354,6 +354,10 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
( 2 + (motor->useProshot ? 4 * MOTOR_NIBBLE_LENGTH_PROSHOT : 16 * MOTOR_BITLENGTH))
/ getDshotHz(pwmProtocolType);
pwmDshotSetDirectionOutput(motor, true);
if (useDshotTelemetry) {
// avoid high line during startup to prevent bootloader activation
*timerChCCR(timerHardware) = 0xffff;
}
#else
pwmDshotSetDirectionOutput(motor, true, &OCINIT, &DMAINIT);
#endif