mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2025-12-12 18:04:21 +08:00
Move param reset to right autoconfig check
This commit is contained in:
@@ -132,6 +132,10 @@ then
|
|||||||
#
|
#
|
||||||
if param compare SYS_AUTOCONFIG 1
|
if param compare SYS_AUTOCONFIG 1
|
||||||
then
|
then
|
||||||
|
# We can't be sure the defaults haven't changed, so
|
||||||
|
# if someone requests a re-configuration, we do it
|
||||||
|
# cleanly from scratch
|
||||||
|
param reset
|
||||||
set DO_AUTOCONFIG yes
|
set DO_AUTOCONFIG yes
|
||||||
else
|
else
|
||||||
set DO_AUTOCONFIG no
|
set DO_AUTOCONFIG no
|
||||||
@@ -173,10 +177,6 @@ then
|
|||||||
#
|
#
|
||||||
if [ $DO_AUTOCONFIG == yes ]
|
if [ $DO_AUTOCONFIG == yes ]
|
||||||
then
|
then
|
||||||
# We can't be sure the defaults haven't changed, so
|
|
||||||
# if someone requests a re-configuration, we do it
|
|
||||||
# cleanly from scratch
|
|
||||||
param reset
|
|
||||||
param set SYS_AUTOCONFIG 0
|
param set SYS_AUTOCONFIG 0
|
||||||
param save
|
param save
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user