mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
avoid double esc startup sounds on f7
This commit is contained in:
parent
1cbff2b9aa
commit
f736561701
2 changed files with 12 additions and 8 deletions
|
@ -393,10 +393,6 @@ 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
|
||||
|
@ -420,6 +416,12 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
|
|||
TIM_CtrlPWMOutputs(timer, ENABLE);
|
||||
TIM_Cmd(timer, ENABLE);
|
||||
}
|
||||
#ifdef USE_DSHOT_TELEMETRY
|
||||
if (useDshotTelemetry) {
|
||||
// avoid high line during startup to prevent bootloader activation
|
||||
*timerChCCR(timerHardware) = 0xffff;
|
||||
}
|
||||
#endif
|
||||
motor->configured = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue