mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Merge remote-tracking branch 'upstream/control_groups' into fw_autoland_att_tecs_navigator_termination_controlgroups
Conflicts: src/systemcmds/tests/module.mk src/systemcmds/tests/tests.h
This commit is contained in:
53
ROMFS/px4fmu_common/init.d/rcS
Executable file → Normal file
53
ROMFS/px4fmu_common/init.d/rcS
Executable file → Normal file
@@ -8,6 +8,8 @@
|
||||
#
|
||||
set MODE autostart
|
||||
|
||||
set logfile /fs/microsd/bootlog.txt
|
||||
|
||||
#
|
||||
# Try to mount the microSD card.
|
||||
#
|
||||
@@ -152,26 +154,49 @@ then
|
||||
nshterm /dev/ttyACM0 &
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Upgrade PX4IO firmware
|
||||
#
|
||||
if px4io detect
|
||||
then
|
||||
echo "PX4IO running, not upgrading"
|
||||
else
|
||||
echo "Attempting to upgrade PX4IO"
|
||||
if px4io update
|
||||
then
|
||||
if [ -d /fs/microsd ]
|
||||
then
|
||||
echo "Flashed PX4IO Firmware OK" > /fs/microsd/px4io.log
|
||||
fi
|
||||
|
||||
# Allow IO to safely kick back to app
|
||||
if [ -f /etc/extras/px4io-v2_default.bin ]
|
||||
then
|
||||
set io_file /etc/extras/px4io-v2_default.bin
|
||||
else
|
||||
set io_file /etc/extras/px4io-v1_default.bin
|
||||
fi
|
||||
|
||||
if px4io start
|
||||
then
|
||||
echo "PX4IO OK"
|
||||
echo "PX4IO OK" >> $logfile
|
||||
fi
|
||||
|
||||
if px4io checkcrc $io_file
|
||||
then
|
||||
echo "PX4IO CRC OK"
|
||||
echo "PX4IO CRC OK" >> $logfile
|
||||
else
|
||||
echo "PX4IO CRC failure"
|
||||
echo "PX4IO CRC failure" >> $logfile
|
||||
tone_alarm MBABGP
|
||||
if px4io forceupdate 14662 $io_file
|
||||
then
|
||||
usleep 200000
|
||||
if px4io start
|
||||
then
|
||||
echo "PX4IO restart OK"
|
||||
echo "PX4IO restart OK" >> $logfile
|
||||
tone_alarm MSPAA
|
||||
else
|
||||
echo "PX4IO restart failed"
|
||||
echo "PX4IO restart failed" >> $logfile
|
||||
tone_alarm MNGGG
|
||||
sh /etc/init.d/rc.error
|
||||
fi
|
||||
else
|
||||
echo "No PX4IO to upgrade here"
|
||||
echo "PX4IO update failed"
|
||||
echo "PX4IO update failed" >> $logfile
|
||||
tone_alarm MNGGG
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user