Fix isfinite compilation for fixed wing example

This commit is contained in:
Lorenz Meier
2016-09-27 18:46:17 +02:00
parent 57f193174c
commit f1e5fe9b39
+5 -5
View File
@@ -383,7 +383,7 @@ int fixedwing_control_thread_main(int argc, char *argv[])
} }
/* check if the throttle was ever more than 50% - go later only to failsafe if yes */ /* check if the throttle was ever more than 50% - go later only to failsafe if yes */
if (isfinite(manual_sp.z) && if (PX4_ISFINITE(manual_sp.z) &&
(manual_sp.z >= 0.6f) && (manual_sp.z >= 0.6f) &&
(manual_sp.z <= 1.0f)) { (manual_sp.z <= 1.0f)) {
} }
@@ -395,10 +395,10 @@ int fixedwing_control_thread_main(int argc, char *argv[])
orb_publish(ORB_ID(vehicle_rates_setpoint), rates_pub, &rates_sp); orb_publish(ORB_ID(vehicle_rates_setpoint), rates_pub, &rates_sp);
/* sanity check and publish actuator outputs */ /* sanity check and publish actuator outputs */
if (isfinite(actuators.control[0]) && if (PX4_ISFINITE(actuators.control[0]) &&
isfinite(actuators.control[1]) && PX4_ISFINITE(actuators.control[1]) &&
isfinite(actuators.control[2]) && PX4_ISFINITE(actuators.control[2]) &&
isfinite(actuators.control[3])) { PX4_ISFINITE(actuators.control[3])) {
orb_publish(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, actuator_pub, &actuators); orb_publish(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, actuator_pub, &actuators);
if (verbose) { if (verbose) {