rc.io:Add USE_IO == yes && IO_PRESENT == yes test

On a FMU without a px4io (FMUv4, NXPhlite etc), this code should
  not be run.
This commit is contained in:
David Sidrane
2018-08-14 09:38:15 -04:00
committed by Daniel Agar
parent 346224a0c6
commit dd69427cbf
+12 -10
View File
@@ -2,15 +2,17 @@
# #
# PX4IO interface init script. # PX4IO interface init script.
# #
if [ $USE_IO == yes -a $IO_PRESENT == yes ]
if px4io start
then then
# Allow PX4IO to recover from midair restarts. if px4io start
px4io recovery then
# Allow PX4IO to recover from midair restarts.
# Adjust PX4IO update rate limit. px4io recovery
px4io limit 400
else # Adjust PX4IO update rate limit.
echo "PX4IO start failed" >> $LOG_FILE px4io limit 400
tune_control play -m ${TUNE_ERR} else
echo "PX4IO start failed" >> $LOG_FILE
tune_control play -m ${TUNE_ERR}
fi
fi fi