Browse Source

AP_AHRS: move logging of LogEvent::SET_HOME up

gps-1.3.1
Peter Barker 3 years ago committed by Andrew Tridgell
parent
commit
f72024fc63
  1. 8
      libraries/AP_AHRS/AP_AHRS_DCM.cpp

8
libraries/AP_AHRS/AP_AHRS_DCM.cpp

@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
#include <GCS_MAVLink/GCS.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_Baro/AP_Baro.h>
#include <AP_Logger/AP_Logger.h>
extern const AP_HAL::HAL& hal;
@ -1157,6 +1158,13 @@ bool AP_AHRS::set_home(const Location &loc) @@ -1157,6 +1158,13 @@ bool AP_AHRS::set_home(const Location &loc)
return false;
}
#if !APM_BUILD_TYPE(APM_BUILD_UNKNOWN)
if (!_home_is_set) {
// record home is set
AP::logger().Write_Event(LogEvent::SET_HOME);
}
#endif
_home = tmp;
_home_is_set = true;

Loading…
Cancel
Save