mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
[Docs] Airframe param reset on update (#24964)
* Airframe param reset on update * Update docs/en/dev_airframes/adding_a_new_frame.md * Apply suggestions from code review Co-authored-by: Matthias Grob <maetugr@gmail.com> * Update adding_a_new_frame.md * Update adding_a_new_frame.md --------- Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
parent
f224d27e4d
commit
a3f1fb2e01
@ -26,7 +26,7 @@ The recommended process for developing a new frame configuration is:
|
||||
1. Configure the [geometry and actuator outputs](../config/actuators.md).
|
||||
1. Perform other [basic configuration](../config/index.md).
|
||||
1. Tune the vehicle.
|
||||
1. Run the [`param show-for-airframe`](../modules/modules_command.md#param) console command to list the parameter difference compared to the original generic airfame.
|
||||
1. Run the [`param show-for-airframe`](../modules/modules_command.md#param) console command to list the parameter difference compared to the original generic airframe.
|
||||
|
||||
Once you have the parameters you can create a new frame configuration file by copying the configuration file for the generic configuration, and appending the new parameters.
|
||||
|
||||
@ -39,7 +39,7 @@ To add a frame configuration to firmware:
|
||||
1. Create a new config file in the [init.d/airframes](https://github.com/PX4/PX4-Autopilot/tree/main/ROMFS/px4fmu_common/init.d/airframes) folder.
|
||||
- Give it a short descriptive filename and prepend the filename with an unused autostart ID (for example, `1033092_superfast_vtol`).
|
||||
- Update the file with configuration parameters and apps (see section above).
|
||||
1. Add the name of the new frame config file to the [CMakeLists.txt](https://github.com/PX4/PX4-Autopilot/blob/main/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt) in the relevant section for the type of vehicle
|
||||
1. Add the name of the new frame config file to the [CMakeLists.txt](https://github.com/PX4/PX4-Autopilot/blob/main/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt) in the relevant section for the type of vehicle.
|
||||
1. [Build and upload](../dev_setup/building_px4.md) the software.
|
||||
|
||||
## How to add a Configuration to an SD Card
|
||||
@ -65,6 +65,18 @@ These aspects are mostly independent, which means that many configurations share
|
||||
New frame configuration files are only automatically added to the build system after a clean build (run `make clean`).
|
||||
:::
|
||||
|
||||
## Force Reset of Airframe Parameters on Update
|
||||
|
||||
To force a reset to the airframe defaults for all users of a specific airframe during update, increase the `PARAM_DEFAULTS_VER` variable in the airframe configuration.
|
||||
It starts at `1` in [rcS](https://github.com/PX4/PX4-Autopilot/blob/main/ROMFS/px4fmu_common/init.d/rcS#L40).
|
||||
Add `set PARAM_DEFAULTS_VER 2` in your airframe file, increasing the value with each future reset needed.
|
||||
|
||||
This value is compared to [SYS_PARAM_VER](https://github.com/PX4/PX4-Autopilot/pull/advanced_config/parameter_reference.md#SYS_PARAM_VER) during PX4 updates.
|
||||
If different, user-customized parameters are reset to defaults.
|
||||
|
||||
Note that system parameters primarily include those related to the vehicle airframe configuration.
|
||||
Parameters such as accumulating flight hours, RC and sensor calibrations, are preserved.
|
||||
|
||||
### Example - Generic Quadcopter Frame Config
|
||||
|
||||
The configuration file for a generic Quad X copter is shown below ([original file here](https://github.com/PX4/PX4-Autopilot/blob/main/ROMFS/px4fmu_common/init.d/airframes/4001_quad_x)).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user