From e29dbbf15882cd64a4728b0bdf02c3394e41d079 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 10 Oct 2018 14:27:00 +1100 Subject: [PATCH] AP_AHRS: notify and log home changes --- libraries/AP_AHRS/AP_AHRS_DCM.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_AHRS/AP_AHRS_DCM.cpp b/libraries/AP_AHRS/AP_AHRS_DCM.cpp index 8845942936..33343f416f 100644 --- a/libraries/AP_AHRS/AP_AHRS_DCM.cpp +++ b/libraries/AP_AHRS/AP_AHRS_DCM.cpp @@ -22,6 +22,7 @@ */ #include "AP_AHRS.h" #include +#include extern const AP_HAL::HAL& hal; @@ -1030,6 +1031,13 @@ void AP_AHRS_DCM::set_home(const Location &loc) _home = loc; _home.options = 0; _home_is_set = true; + + // log ahrs home and ekf origin dataflash + Log_Write_Home_And_Origin(); + + // send new home and ekf origin to GCS + gcs().send_home(); + gcs().send_ekf_origin(); } // a relative ground position to home in meters, Down