diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index fbde38a3f8..cd2a0272cd 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -666,9 +666,10 @@ void stopMotors(void) delay(50); // give the timers and ESCs a chance to react. } -void StopPwmAllMotors() +void stopPwmAllMotors() { pwmShutdownPulsesForAllMotors(motorCount); + delayMicroseconds(1500); } #ifndef USE_QUAD_MIXER_ONLY diff --git a/src/main/flight/mixer.h b/src/main/flight/mixer.h index f3999517c7..4f4869b205 100644 --- a/src/main/flight/mixer.h +++ b/src/main/flight/mixer.h @@ -215,4 +215,4 @@ void mixTable(void); void syncMotors(bool enabled); void writeMotors(void); void stopMotors(void); -void StopPwmAllMotors(void); +void stopPwmAllMotors(void); diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 8f8bad45d9..49219a129e 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -2574,7 +2574,7 @@ static void cliRebootEx(bool bootLoader) cliPrint("\r\nRebooting"); bufWriterFlush(cliWriter); waitForSerialPortToFinishTransmitting(cliPort); - stopMotors(); + stopPwmAllMotors(); if (bootLoader) { systemResetToBootloader(); return; diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index e788401e77..48d6ae92e8 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -1967,7 +1967,7 @@ void mspProcess(void) if (isRebootScheduled) { waitForSerialPortToFinishTransmitting(candidatePort->port); - stopMotors(); + stopPwmAllMotors(); // On real flight controllers, systemReset() will do a soft reset of the device, // reloading the program. But to support offline testing this flag needs to be // cleared so that the software doesn't continuously attempt to reboot itself. diff --git a/src/main/main.c b/src/main/main.c index 01865fdbf7..a411117617 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -335,12 +335,6 @@ void init(void) mixerUsePWMOutputConfiguration(pwmOutputConfiguration, use_unsyncedPwm); -/* - // TODO is this needed here? enables at the end - if (!feature(FEATURE_ONESHOT125)) - motorControlEnable = true; - -*/ systemState |= SYSTEM_STATE_MOTORS_READY; #ifdef BEEPER