Add param defs for all 4.X ardupilot versions#1110
Merged
1Blademaster merged 2 commits intoMar 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for ArduPilot 4.x version-specific parameter definition files in the GCS, so parameter metadata (names, ranges, enums, reboot-required flags, etc.) can be resolved against the connected vehicle’s firmware major.minor version instead of a single global definition per vehicle type.
Changes:
- Introduces a
useParamDefinitionshook that selects and lazy-loads the correct param-def JSON based on aircraft type + firmware version (with fallback to “latest” via a manifest). - Replaces direct imports of
gen_apm_params_def_{vehicle}.jsonacross params/config UI with the new hook. - Updates the generator to fetch and emit versioned param definition files plus a
gen_apm_params_versions.jsonmanifest; updates runtime file checks, gitignore, and docs accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| gcs/src/helpers/paramDefinitions.js | New hook to resolve + async-load param definitions by aircraft type and 4.x major.minor version. |
| gcs/src/components/params/rowItem.jsx | Switches param definition lookup from static JSON imports to useParamDefinitions(). |
| gcs/src/components/params/loadParamsFileModal.jsx | Uses resolved param defs to determine reboot_required when loading params from file. |
| gcs/src/components/config/servoOutput.jsx | Uses useParamDefinitions() for SERVO* param metadata (ranges/options). |
| gcs/src/components/config/serialPorts.jsx | Uses useParamDefinitions() for SERIAL* param metadata (options/bitmask). |
| gcs/src/components/config/radioCalibration.jsx | Uses useParamDefinitions() for RC option enums. |
| gcs/src/components/config/gripper.jsx | Uses useParamDefinitions() for gripper param metadata. |
| gcs/electron/main.ts | Updates dev-time required-file checks to validate the manifest and all referenced versioned param-def files exist. |
| gcs/data/generate_param_definitions.py | Reworks generator to discover all Plane/Copter 4.x versions and emit versioned JSON + manifest. |
| gcs/.gitignore | Ignores versioned param def files and the new manifest. |
| docs/DEVELOPMENT_GUIDE.md | Documents the new “generate all 4.x versions + manifest” behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.