mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-08 17:03:57 -04:00
DataFlash: Only log EKF messages when enabled
This commit is contained in:
parent
624f169b9b
commit
46e4c45537
@ -1111,6 +1111,8 @@ void DataFlash_Class::Log_Write_POS(AP_AHRS &ahrs)
|
|||||||
#if AP_AHRS_NAVEKF_AVAILABLE
|
#if AP_AHRS_NAVEKF_AVAILABLE
|
||||||
void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled)
|
void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled)
|
||||||
{
|
{
|
||||||
|
// only log EKF if enabled
|
||||||
|
if (ahrs.get_NavEKF().enabled()) {
|
||||||
// Write first EKF packet
|
// Write first EKF packet
|
||||||
Vector3f euler;
|
Vector3f euler;
|
||||||
Vector3f posNED;
|
Vector3f posNED;
|
||||||
@ -1254,6 +1256,7 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled)
|
|||||||
};
|
};
|
||||||
WriteBlock(&pkt5, sizeof(pkt5));
|
WriteBlock(&pkt5, sizeof(pkt5));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// do EKF2 as well if enabled
|
// do EKF2 as well if enabled
|
||||||
if (ahrs.get_NavEKF2().enabled()) {
|
if (ahrs.get_NavEKF2().enabled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user