diff options
Diffstat (limited to 'ROMFS/px4fmu_common/init.d/rcS')
-rwxr-xr-x | ROMFS/px4fmu_common/init.d/rcS | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index c4abd07d2..6da03402e 100755 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -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 # |