mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-03-24 02:24:09 +08:00
fix(rcS): reset the flight mode assignments during an airframe reset (#26773)
* fix(rcS): reset the flight mode assignments during an airframe reset because there are many products that have a default flight mode assignment in the airframe file and if the user resets to airframe defaults the flight mode assignment stays custom and doesn't get reset to "factory settings". It's neither a unit specific calibration nor a parameter to track total flights or flight time. I suggest to reset it as well. * fix(posix rcS): sync airframe reset with the px4 common startup script to make simulation testing of an airframe reset more realistic.
This commit is contained in:
@@ -119,10 +119,11 @@ else
|
||||
param set SYS_AUTOCONFIG 1
|
||||
fi
|
||||
|
||||
if param compare SYS_AUTOCONFIG 1
|
||||
# To trigger a parameter reset during boot SYS_AUTCONFIG was set to 1 before
|
||||
if param greater SYS_AUTOCONFIG 0
|
||||
then
|
||||
# Reset params except Airframe, RC calibration, sensor calibration, flight modes, total flight time, and next flight UUID.
|
||||
param reset_all SYS_AUTOSTART RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
|
||||
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, total flight time, flight UUID
|
||||
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* LND_FLIGHT* TC_* COM_FLIGHT*
|
||||
set AUTOCNF yes
|
||||
fi
|
||||
|
||||
|
||||
@@ -191,8 +191,8 @@ else
|
||||
# To trigger a parameter reset during boot SYS_AUTCONFIG was set to 1 before
|
||||
if param greater SYS_AUTOCONFIG 0
|
||||
then
|
||||
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, flight modes, total flight time, flight UUID
|
||||
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
|
||||
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, total flight time, flight UUID
|
||||
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* LND_FLIGHT* TC_* COM_FLIGHT*
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user