SITL: add SYS_AUTOCONFIG support

This commit is contained in:
Julien Lecoeur 2019-11-18 17:35:53 +01:00 committed by Nuno Marques
parent 1371887578
commit be99064133
1 changed files with 16 additions and 0 deletions

View File

@ -80,6 +80,15 @@ then
set AUTOCNF no
else
set AUTOCNF yes
param set SYS_AUTOCONFIG 1
fi
if param compare SYS_AUTOCONFIG 1
then
set AUTOCNF yes
# Wipe out params except RC*, flight modes, total flight time, accel cal, gyro cal, next flight UUID
param reset_nostart RC* COM_FLTMODE* LND_FLIGHT_T_* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT_UUID
fi
# multi-instance setup
@ -202,6 +211,13 @@ fi
sh "$autostart_file"
#
# If autoconfig parameter was set, reset it and save parameters.
#
if [ $AUTOCNF = yes ]
then
param set SYS_AUTOCONFIG 0
fi
dataman start
replay tryapplyparams