mirror of https://github.com/ArduPilot/ardupilot
AP_AHRS: move logging of LogEvent::SET_HOME up
This commit is contained in:
parent
408491ddd5
commit
f72024fc63
|
@ -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)
|
|||
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…
Reference in New Issue