Skip to content
Snippets Groups Projects
Commit 870b9b0f authored by Randy Mackay's avatar Randy Mackay
Browse files

Copter: only run nav controllers when auto-armed

This stops run-up in target position and nav controller I terms ahead of
throttle being raised
parent 5296e858
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,11 @@ static void update_navigation() ...@@ -6,6 +6,11 @@ static void update_navigation()
{ {
static uint32_t nav_last_update = 0; // the system time of the last time nav was run update static uint32_t nav_last_update = 0; // the system time of the last time nav was run update
// exit immediately if not auto_armed
if (!ap.auto_armed) {
return;
}
// check for inertial nav updates // check for inertial nav updates
if( inertial_nav.position_ok() ) { if( inertial_nav.position_ok() ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment