mirror of https://github.com/ArduPilot/ardupilot
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
This commit is contained in:
parent
5d20594fa4
commit
7d4c74c28e
|
@ -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…
Reference in New Issue