Files
PX4-Autopilot/boards/atl/mantis-edu/init/rc.board_defaults
T
Julian Oes a50f7af3b1 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.
2022-01-10 23:04:10 -05:00

40 lines
783 B
Bash

#!/bin/sh
#
# board specific defaults
#------------------------------------------------------------------------------
param set-default SYS_AUTOSTART 4061
param set-default BAT1_V_DIV 9.0
param set-default COM_ARM_SDCARD 0
param set-default SENS_EXT_I2C_PRB 0
param set-default EKF2_MULTI_IMU 1
param set-default EKF2_MULTI_MAG 1
param set-default SENS_IMU_MODE 0
param set-default SENS_MAG_MODE 0
param set-default EV_TSK_STAT_DIS 1
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