mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 04:53:34 +08:00
Q estimator: Fix scope of sensor voting scheme
This commit is contained in:
@@ -333,6 +333,10 @@ void AttitudeEstimatorQ::task_main()
|
|||||||
// Update sensors
|
// Update sensors
|
||||||
sensor_combined_s sensors;
|
sensor_combined_s sensors;
|
||||||
|
|
||||||
|
int best_gyro = 0;
|
||||||
|
int best_accel = 0;
|
||||||
|
int best_mag = 0;
|
||||||
|
|
||||||
if (!orb_copy(ORB_ID(sensor_combined), _sensors_sub, &sensors)) {
|
if (!orb_copy(ORB_ID(sensor_combined), _sensors_sub, &sensors)) {
|
||||||
// Feed validator with recent sensor data
|
// Feed validator with recent sensor data
|
||||||
|
|
||||||
@@ -369,8 +373,6 @@ void AttitudeEstimatorQ::task_main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int best_gyro, best_accel, best_mag;
|
|
||||||
|
|
||||||
// Get best measurement values
|
// Get best measurement values
|
||||||
hrt_abstime curr_time = hrt_absolute_time();
|
hrt_abstime curr_time = hrt_absolute_time();
|
||||||
_gyro.set(_voter_gyro.get_best(curr_time, &best_gyro));
|
_gyro.set(_voter_gyro.get_best(curr_time, &best_gyro));
|
||||||
|
|||||||
Reference in New Issue
Block a user