AP_Mission: If a command fails to start immediately cycle to the next

This commit is contained in:
Michael du Breuil 2018-08-22 13:56:01 -07:00 committed by Andrew Tridgell
parent 18512eebbb
commit 7db5daadad
1 changed files with 3 additions and 2 deletions

View File

@ -1411,8 +1411,9 @@ bool AP_Mission::advance_current_nav_cmd(uint16_t starting_index)
}
// set current navigation command and start it
_nav_cmd = cmd;
_flags.nav_cmd_loaded = true;
_cmd_start_fn(_nav_cmd);
if (_cmd_start_fn(_nav_cmd)) {
_flags.nav_cmd_loaded = true;
}
}else{
// set current do command and start it (if not already set)
if (!_flags.do_cmd_loaded) {