mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
ekf2: don't print distance_sensor selection unless there are multiple options
This commit is contained in:
@@ -1608,7 +1608,12 @@ void EKF2::UpdateRangeSample(ekf2_timestamps_s &ekf2_timestamps)
|
|||||||
&& (distance_sensor.orientation == distance_sensor_s::ROTATION_DOWNWARD_FACING)) {
|
&& (distance_sensor.orientation == distance_sensor_s::ROTATION_DOWNWARD_FACING)) {
|
||||||
|
|
||||||
if (_distance_sensor_sub.ChangeInstance(i)) {
|
if (_distance_sensor_sub.ChangeInstance(i)) {
|
||||||
PX4_INFO("%d - selected distance_sensor:%d", _instance, i);
|
int ndist = orb_group_count(ORB_ID(distance_sensor));
|
||||||
|
|
||||||
|
if (ndist > 1) {
|
||||||
|
PX4_INFO("%d - selected distance_sensor:%d (%d advertised)", _instance, i, ndist);
|
||||||
|
}
|
||||||
|
|
||||||
_distance_sensor_selected = true;
|
_distance_sensor_selected = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user