mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 13:53:34 +08:00
autostart scripts: Reintroduce SYS_PARAM_VER (#22813)
The case where the airframe maintainer wants to enforce a reset to airframe is not covered anymore with the `param set-default` mechanism. For products based on PX4 this is still required to ensure proper functionality after a major update.
This commit is contained in:
@@ -83,6 +83,19 @@ PARAM_DEFINE_INT32(SYS_AUTOCONFIG, 0);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SYS_HITL, 0);
|
||||
|
||||
/**
|
||||
* Parameter version
|
||||
*
|
||||
* This is used internally only: an airframe configuration might set an expected
|
||||
* parameter version value via PARAM_DEFAULTS_VER. This is checked on bootup
|
||||
* against SYS_PARAM_VER, and if they do not match, parameters are reset and
|
||||
* reloaded from the airframe configuration.
|
||||
*
|
||||
* @min 0
|
||||
* @group System
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SYS_PARAM_VER, 1);
|
||||
|
||||
/**
|
||||
* Enable auto start of rate gyro thermal calibration at the next power up.
|
||||
*
|
||||
|
||||
@@ -310,6 +310,9 @@ MavlinkParametersManager::send()
|
||||
param_find("TRIG_MODE");
|
||||
param_find("UAVCAN_ENABLE");
|
||||
|
||||
// parameter only used in startup script but should show on ground station
|
||||
param_find("SYS_PARAM_VER");
|
||||
|
||||
_first_send = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user