1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 20:10:18 +03:00

Ensure motors are stopped before a reboot. Ensure hard fault handler

doesn't use potentially unitialised data to update the motors.  Pause
for 50ms before rebooting after updating disabling the motors to ensure
the timer hardware and ESCs havea chance to react.

This commit might help with #123
This commit is contained in:
Dominic Clifton 2015-02-23 13:59:41 +00:00
parent b568b9c59d
commit b9e1283809
5 changed files with 37 additions and 6 deletions

View file

@ -1344,6 +1344,7 @@ static void cliRateProfile(char *cmdline)
static void cliReboot(void) {
cliPrint("\r\nRebooting");
waitForSerialPortToFinishTransmitting(cliPort);
stopMotors();
systemReset();
}