2018-12-18 09:26:22 +01:00
|
|
|
#!/bin/sh
|
2013-08-25 19:27:11 +02:00
|
|
|
#
|
2018-07-19 02:41:02 -06:00
|
|
|
# PX4IO interface init script.
|
2013-08-25 19:27:11 +02:00
|
|
|
#
|
2019-11-15 20:01:40 -05:00
|
|
|
|
|
|
|
|
# If $OUTPUT_MODE indicated Hardware-int-the-loop simulation, px4io should not publish actuator_outputs,
|
|
|
|
|
# instead, pwm_out_sim will publish that uORB
|
|
|
|
|
if [ $OUTPUT_MODE = hil ]
|
|
|
|
|
then
|
|
|
|
|
set HIL_ARG $OUTPUT_MODE
|
|
|
|
|
fi
|
|
|
|
|
|
2020-03-26 13:53:24 +01:00
|
|
|
if [ $IO_PRESENT = yes ]
|
2015-04-25 09:01:22 +02:00
|
|
|
then
|
2019-11-15 20:01:40 -05:00
|
|
|
if px4io start $HIL_ARG
|
2018-08-10 12:54:18 -07:00
|
|
|
then
|
|
|
|
|
# Allow PX4IO to recover from midair restarts.
|
|
|
|
|
px4io recovery
|
|
|
|
|
else
|
2020-11-11 14:20:55 -05:00
|
|
|
echo "PX4IO start failed"
|
2020-10-05 21:39:26 -04:00
|
|
|
tune_control play -t 18 # PROG_PX4IO_ERR
|
2018-08-10 12:54:18 -07:00
|
|
|
fi
|
2015-04-25 09:01:22 +02:00
|
|
|
fi
|