mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Always stop motor PWM prior to soft restart
This commit is contained in:
parent
655bd574c2
commit
d1d73d933e
1 changed files with 4 additions and 2 deletions
|
@ -940,9 +940,11 @@ void changeControlRateProfile(uint8_t profileIndex)
|
|||
|
||||
void handleOneshotFeatureChangeOnRestart(void)
|
||||
{
|
||||
// When OneShot125 feature changed state, shutdown PWM on all motors and apply a delay before
|
||||
// Shutdown PWM on all motors prior to soft restart
|
||||
StopPwmAllMotors();
|
||||
delay(50);
|
||||
// When OneShot125 feature changed state apply additional delay
|
||||
if ((masterConfig.enabledFeatures ^ activeFeaturesLatch) & FEATURE_ONESHOT125) {
|
||||
StopPwmAllMotors();
|
||||
delay(ONESHOT_FEATURE_CHANGED_DELAY_ON_BOOT_MS);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue