From 7ae90237e3fdc59f99542d1ccc2940f06fcb5060 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Oct 2018 16:36:07 +1100 Subject: [PATCH] Rover: use set_flying to allow for compass learning to run --- APMrover2/APMrover2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/APMrover2/APMrover2.cpp b/APMrover2/APMrover2.cpp index 5ec6d7b23c..64e750ddaa 100644 --- a/APMrover2/APMrover2.cpp +++ b/APMrover2/APMrover2.cpp @@ -302,6 +302,10 @@ void Rover::one_second_loop(void) // indicates that the sensor or subsystem is present but not // functioning correctly update_sensor_status_flags(); + + // need to set "likely flying" when armed to allow for compass + // learning to run + ahrs.set_likely_flying(hal.util->get_soft_armed()); } void Rover::update_GPS(void)