1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +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

@ -487,6 +487,13 @@ void writeAllMotors(int16_t mc)
writeMotors();
}
void stopMotors(void)
{
writeAllMotors(escAndServoConfig->mincommand);
delay(50); // give the timers and ESCs a chance to react.
}
#ifndef USE_QUAD_MIXER_ONLY
static void airplaneMixer(void)
{