PX4IO: Robustify upgrade process

These changes remove the two code paths to updates (forceupdate and update) and try to reboot and bootload IO independent of its state, wether it is in bootloader mode already, safety switch is off or if it is in "nominal state" (running and safety on). This ensures that there are no conditions where user error or boot sequence can prevent a successful upgrade. The only state where an upgrade will not be done is if the system is fully armed.
This commit is contained in:
Lorenz Meier
2021-02-21 22:39:52 +01:00
committed by Daniel Agar
parent 82200fab9e
commit aacbc04730
3 changed files with 76 additions and 108 deletions

View File

@@ -84,7 +84,7 @@ then
else
echo "PX4IO CRC failure"
tune_control play -t 16 # tune 16 = PROG_PX4IO
if px4io forceupdate 14662 $io_file
if px4io update $io_file
then
if px4io start
then