mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
EKF2: only check for EKF2_BETA_FUSION when corresponding kconfig option is set
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -2361,11 +2361,15 @@ void EKF2::UpdateSystemFlagsSample(ekf2_timestamps_s &ekf2_timestamps)
|
|||||||
// let the EKF know if the vehicle motion is that of a fixed wing (forward flight only relative to wind)
|
// let the EKF know if the vehicle motion is that of a fixed wing (forward flight only relative to wind)
|
||||||
flags.is_fixed_wing = (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING);
|
flags.is_fixed_wing = (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING);
|
||||||
|
|
||||||
|
#if defined(CONFIG_EKF2_SIDESLIP)
|
||||||
|
|
||||||
if (vehicle_status.is_vtol_tailsitter && _params->beta_fusion_enabled) {
|
if (vehicle_status.is_vtol_tailsitter && _params->beta_fusion_enabled) {
|
||||||
PX4_WARN("Disable EKF beta fusion as unsupported for tailsitter");
|
PX4_WARN("Disable EKF beta fusion as unsupported for tailsitter");
|
||||||
_param_ekf2_fuse_beta.set(0);
|
_param_ekf2_fuse_beta.set(0);
|
||||||
_param_ekf2_fuse_beta.commit_no_notification();
|
_param_ekf2_fuse_beta.commit_no_notification();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // CONFIG_EKF2_SIDESLIP
|
||||||
}
|
}
|
||||||
|
|
||||||
// vehicle_land_detected
|
// vehicle_land_detected
|
||||||
|
|||||||
Reference in New Issue
Block a user