mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
sensors only publish airspeed if finite
This commit is contained in:
@@ -372,8 +372,10 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw)
|
|||||||
|
|
||||||
airspeed.air_temperature_celsius = air_temperature_celsius;
|
airspeed.air_temperature_celsius = air_temperature_celsius;
|
||||||
|
|
||||||
int instance;
|
if (PX4_ISFINITE(airspeed.indicated_airspeed_m_s) && PX4_ISFINITE(airspeed.true_airspeed_m_s)) {
|
||||||
orb_publish_auto(ORB_ID(airspeed), &_airspeed_pub, &airspeed, &instance, ORB_PRIO_DEFAULT);
|
int instance;
|
||||||
|
orb_publish_auto(ORB_ID(airspeed), &_airspeed_pub, &airspeed, &instance, ORB_PRIO_DEFAULT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user