Auto-update IO also when safety off

This commit is contained in:
Lorenz Meier
2015-02-15 19:52:01 +01:00
parent ccac7cbd78
commit eb28aa6cfe
+8 -2
View File
@@ -23,6 +23,7 @@ set TUNE_ERR ML<<CP4CP4CP4CP4CP4
# #
# Try to mount the microSD card. # Try to mount the microSD card.
# #
# REBOOTWORK this needs to start after the flight control loop
echo "[i] Looking for microSD..." echo "[i] Looking for microSD..."
if mount -t vfat /dev/mmcsd0 /fs/microsd if mount -t vfat /dev/mmcsd0 /fs/microsd
then then
@@ -51,6 +52,7 @@ unset FRC
if [ $MODE == autostart ] if [ $MODE == autostart ]
then then
# Try to get an USB console # Try to get an USB console
# REBOOTWORK this needs to start after the flight control loop
nshterm /dev/ttyACM0 & nshterm /dev/ttyACM0 &
# #
@@ -186,7 +188,7 @@ then
set IO_FILE /etc/extras/px4io-v1_default.bin set IO_FILE /etc/extras/px4io-v1_default.bin
fi fi
if px4io checkcrc $IO_FILE if px4io checkcrc ${IO_FILE}
then then
echo "PX4IO CRC OK" >> $LOG_FILE echo "PX4IO CRC OK" >> $LOG_FILE
@@ -196,7 +198,10 @@ then
tone_alarm MLL32CP8MB tone_alarm MLL32CP8MB
if px4io forceupdate 14662 $IO_FILE px4io start
px4io safety_on
if px4io forceupdate 14662 ${IO_FILE}
then then
usleep 500000 usleep 500000
if px4io checkcrc $IO_FILE if px4io checkcrc $IO_FILE
@@ -265,6 +270,7 @@ then
unset HIL unset HIL
# waypoint storage # waypoint storage
# REBOOTWORK this needs to start in parallel
if dataman start if dataman start
then then
fi fi