From 5759a6999287bc23e3f667f79d18f462897273d9 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 27 Aug 2014 17:04:30 +0900 Subject: [PATCH] Mission: start next nav cmd immediately after prev completes --- libraries/AP_Mission/AP_Mission.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/AP_Mission/AP_Mission.cpp b/libraries/AP_Mission/AP_Mission.cpp index 6938135264..2c6cb1625d 100644 --- a/libraries/AP_Mission/AP_Mission.cpp +++ b/libraries/AP_Mission/AP_Mission.cpp @@ -183,6 +183,12 @@ void AP_Mission::update() if (_cmd_verify_fn(_nav_cmd)) { // market _nav_cmd as complete (it will be started on the next iteration) _flags.nav_cmd_loaded = false; + // immediately advance to the next mission command + if (!advance_current_nav_cmd()) { + // failure to advance nav command means mission has completed + complete(); + return; + } } }