Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Commit

Permalink
px4io: on config error ask IO to reboot to bootloader
Browse files Browse the repository at this point in the history
this allows us to update fw when core config settings have changed,
such as the actuators/servos change that happened recently
  • Loading branch information
tridge committed Apr 13, 2016
1 parent f0c943a commit 086e789
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/drivers/px4io/px4io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,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;
}

Expand Down

0 comments on commit 086e789

Please sign in to comment.