Updated IO firmware upgrade strategy and locations

This commit is contained in:
Lorenz Meier
2013-08-28 09:14:38 +02:00
parent 66c61fbe96
commit d28f5ac03f
4 changed files with 33 additions and 40 deletions
+7 -15
View File
@@ -108,25 +108,17 @@ then
nshterm /dev/ttyACM0 &
#
# Check if PX4IO Firmware should be upgraded (from Andrew Tridgell)
# Upgrade PX4IO firmware
#
if [ -f /fs/microsd/px4io.bin ]
if px4io update
then
echo "PX4IO Firmware found. Checking Upgrade.."
if cmp /fs/microsd/px4io.bin /fs/microsd/px4io.cur
if [ -d /fs/microsd ]
then
echo "No newer version, skipping upgrade."
else
echo "Loading /fs/microsd/px4io.bin"
if px4io update /fs/microsd/px4io.bin > /fs/microsd/px4io.log
then
cp /fs/microsd/px4io.bin /fs/microsd/px4io.cur
echo "Flashed /fs/microsd/px4io.bin OK" >> /fs/microsd/px4io.log
else
echo "Failed flashing /fs/microsd/px4io.bin" >> /fs/microsd/px4io.log
echo "Failed to upgrade px4io firmware - check if px4io is in bootloader mode"
fi
echo "Flashed PX4IO Firmware OK" > /fs/microsd/px4io.log
fi
# Allow IO to safely kick back to app
usleep 200000
fi
#