From 160e5fa311ec907aca79256711753e41b4aaca2c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Feb 2013 18:15:23 +1100 Subject: [PATCH] HAL_PX4: show a message if we fail to upgrade PX4IO firmware --- libraries/AP_HAL_PX4/scripts/rc.APM | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_PX4/scripts/rc.APM b/libraries/AP_HAL_PX4/scripts/rc.APM index 1bd7e0957c..7cc080cb05 100644 --- a/libraries/AP_HAL_PX4/scripts/rc.APM +++ b/libraries/AP_HAL_PX4/scripts/rc.APM @@ -49,9 +49,14 @@ then echo "No new px4io firmware" else echo "Loading /fs/microsd/px4io.bin" - px4io update /fs/microsd/px4io.bin > /fs/microsd/APM/px4io_update.log - cp /fs/microsd/px4io.bin /fs/microsd/px4io.bin.loaded - echo "Loaded /fs/microsd/px4io.bin OK" >> /fs/microsd/APM/px4io_update.log + if px4io update /fs/microsd/px4io.bin > /fs/microsd/APM/px4io_update.log + then + cp /fs/microsd/px4io.bin /fs/microsd/px4io.bin.loaded + echo "Loaded /fs/microsd/px4io.bin OK" >> /fs/microsd/APM/px4io_update.log + else + echo "Failed loading /fs/microsd/px4io.bin" >> /fs/microsd/APM/px4io_update.log + echo "Failed to upgrade PX4IO firmware - check PX4IO is in bootloader mode" + fi fi fi