From a50f7af3b1c2fcc63f63f2ceb8a1e2f9d82c4b84 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 30 Sep 2021 15:20:14 +0200 Subject: [PATCH] Mantis: update bootloader and SYS_AUTOSTART This adds a check for the previous SYS_AUTOSTART id. If it is still the old/previous SYS_AUTOSTART id, it will flash the new bootloader as well as set the proper SYS_AUTOSTART id. --- boards/atl/mantis-edu/init/rc.board_defaults | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/boards/atl/mantis-edu/init/rc.board_defaults b/boards/atl/mantis-edu/init/rc.board_defaults index 54ea0280bb..9096a38d5f 100644 --- a/boards/atl/mantis-edu/init/rc.board_defaults +++ b/boards/atl/mantis-edu/init/rc.board_defaults @@ -22,3 +22,18 @@ set LOGGER_ARGS "-m mavlink" # Start esc tap_esc start -d /dev/ttyS4 -n 4 + +# Transition from previous non open-source flight stack +if param compare SYS_AUTOSTART 4001 +then + param reset_all + tune_control play -t 4 + sleep 2 + if bl_update /etc/extras/bootloader.bin + then + tune_control play -t 3 + else + tune_control play -t 5 + fi + sleep 2 +fi