forked from Archive/PX4-Autopilot
SITL: add SYS_AUTOCONFIG support
This commit is contained in:
parent
1371887578
commit
be99064133
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue