Skip to content
Snippets Groups Projects
Commit fda2edb7 authored by Daniel Agar's avatar Daniel Agar
Browse files

sensors only publish airspeed if finite

parent 9d3dfb78
No related branches found
No related tags found
No related merge requests found
......@@ -372,8 +372,10 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw)
airspeed.air_temperature_celsius = air_temperature_celsius;
int instance;
orb_publish_auto(ORB_ID(airspeed), &_airspeed_pub, &airspeed, &instance, ORB_PRIO_DEFAULT);
if (PX4_ISFINITE(airspeed.indicated_airspeed_m_s) && PX4_ISFINITE(airspeed.true_airspeed_m_s)) {
int instance;
orb_publish_auto(ORB_ID(airspeed), &_airspeed_pub, &airspeed, &instance, ORB_PRIO_DEFAULT);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment