mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_NavEKF: log EKF data source set changes
This commit is contained in:
parent
110d48e6fa
commit
1db7e9e2e2
@ -16,6 +16,7 @@
|
||||
#include "AP_NavEKF_Source.h"
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_DAL/AP_DAL.h>
|
||||
#include <AP_Logger/AP_Logger.h>
|
||||
|
||||
extern const AP_HAL::HAL& hal;
|
||||
|
||||
@ -151,6 +152,12 @@ void AP_NavEKF_Source::setPosVelYawSourceSet(uint8_t source_set_idx)
|
||||
// sanity check source idx
|
||||
if (source_set_idx < AP_NAKEKF_SOURCE_SET_MAX) {
|
||||
active_source_set = source_set_idx;
|
||||
static const LogEvent evt[AP_NAKEKF_SOURCE_SET_MAX] {
|
||||
LogEvent::EK3_SOURCES_SET_TO_PRIMARY,
|
||||
LogEvent::EK3_SOURCES_SET_TO_SECONDARY,
|
||||
LogEvent::EK3_SOURCES_SET_TO_TERTIARY,
|
||||
};
|
||||
AP::logger().Write_Event(evt[active_source_set]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user