Browse Source

Copter: when leaving AUTO only stop mission if running

This resolves an issue in which the mission would not automatically
start from the beginning if it had previously been run to completion
master
Randy Mackay 11 years ago
parent
commit
7d4c74c28e
  1. 4
      ArduCopter/flight_mode.pde

4
ArduCopter/flight_mode.pde

@ -210,7 +210,9 @@ static void exit_mode(uint8_t old_control_mode, uint8_t new_control_mode) @@ -210,7 +210,9 @@ static void exit_mode(uint8_t old_control_mode, uint8_t new_control_mode)
// stop mission when we leave auto mode
if (old_control_mode == AUTO) {
mission.stop();
if (mission.state() == AP_Mission::MISSION_RUNNING) {
mission.stop();
}
}
// smooth throttle transition when switching from manual to automatic flight modes

Loading…
Cancel
Save