Skip to content

Add param defs for all 4.X ardupilot versions#1110

Merged
1Blademaster merged 2 commits into
mainfrom
1071-bug-correct-param-defs-are-not-displayed-for-ap-versions
Mar 22, 2026
Merged

Add param defs for all 4.X ardupilot versions#1110
1Blademaster merged 2 commits into
mainfrom
1071-bug-correct-param-defs-are-not-displayed-for-ap-versions

Conversation

@1Blademaster
Copy link
Copy Markdown
Member

No description provided.

@1Blademaster 1Blademaster linked an issue Mar 22, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings March 22, 2026 15:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 useParamDefinitions hook 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}.json across params/config UI with the new hook.
  • Updates the generator to fetch and emit versioned param definition files plus a gen_apm_params_versions.json manifest; 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.

Comment thread gcs/src/helpers/paramDefinitions.js
Comment thread gcs/src/helpers/paramDefinitions.js Outdated
Comment thread gcs/src/components/params/loadParamsFileModal.jsx
Comment thread gcs/electron/main.ts
@1Blademaster 1Blademaster merged commit 124641a into main Mar 22, 2026
5 checks passed
@1Blademaster 1Blademaster deleted the 1071-bug-correct-param-defs-are-not-displayed-for-ap-versions branch March 22, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Correct param defs are not displayed for AP versions

2 participants