From 3fda934d1b4ecc4763a1b9c804b2416264acdfb4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 Mar 2016 16:25:04 +1100 Subject: [PATCH] px4io: on config error ask IO to reboot to bootloader this allows us to update fw when core config settings have changed, such as the actuators/servos change that happened recently --- src/drivers/px4io/px4io.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 6297248c0e..2401f60b08 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -692,6 +692,12 @@ PX4IO::init() DEVICE_LOG("config read error"); mavlink_log_emergency(&_mavlink_log_pub, "[IO] config read fail, abort."); + + // ask IO to reboot into bootloader as the failure may + // be due to mismatched firmware versions and we want + // the startup script to be able to load a new IO + // firmware + io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_REBOOT_BL, PX4IO_REBOOT_BL_MAGIC); return -1; }