Skip to content

feat(ParameterEditor): allow Advanced UI override of read-only params#14415

Draft
dakejahl wants to merge 1 commit into
mavlink:masterfrom
dakejahl:readonly-override
Draft

feat(ParameterEditor): allow Advanced UI override of read-only params#14415
dakejahl wants to merge 1 commit into
mavlink:masterfrom
dakejahl:readonly-override

Conversation

@dakejahl
Copy link
Copy Markdown
Collaborator

Summary

Adds an Advanced-UI escape hatch in the parameter editor dialog so users can override the read-only lock on parameters, matching the existing "Force save" pattern for min/max validation.

Problem

QGC now respects the readOnly metadata flag (used by ArduPilot to lock certain params, added in #14007) by hiding the input field entirely. Unlike min/max bounds — which Advanced-UI users can bypass via "Force save (dangerous!)" — there is no way to override the read-only constraint, even for diagnostic or recovery scenarios where the lock is overly restrictive.

Solution

ParameterEditorDialog shows a "Force edit read-only param (dangerous!)" checkbox when both fact.readOnly and showAdvancedUI are true. Checking it transitions the dialog into the normal edit view (input field + Save button) and turns the read-only label into a red warning. UI gating is centralised on a derived _readOnlyDisplay: fact.readOnly && !forceEdit.checked property so the existing read-only branches stay tidy. No C++ changes were needed — Fact::setRawValue does not gate on the flag; it was a UI-only constraint.

Adds a "Force edit read-only param (dangerous!)" checkbox in
ParameterEditorDialog visible when the param is read-only and Advanced
UI is on. Checking it transitions the dialog from the read-only view
(message + value display) into the regular edit mode (input + Save),
mirroring the existing "Force save" escape hatch for min/max bounds.
@dakejahl dakejahl marked this pull request as draft May 20, 2026 21:28
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.45%. Comparing base (f29efd3) to head (9debd6e).
⚠️ Report is 25 commits behind head on master.

❌ Your project check has failed because the head coverage (26.45%) is below the target coverage (30.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14415      +/-   ##
==========================================
+ Coverage   25.47%   26.45%   +0.98%     
==========================================
  Files         769      767       -2     
  Lines       65912    66285     +373     
  Branches    30495    30667     +172     
==========================================
+ Hits        16788    17533     +745     
+ Misses      37285    36309     -976     
- Partials    11839    12443     +604     
Flag Coverage Δ
unittests 26.45% <ø> (+0.98%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 104 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 483aae4...9debd6e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

Build Results

Platform Status

Platform Status Details
Linux Passed View
Windows Passed View
MacOS Passed View
Android Passed View

All builds passed.

Pre-commit

Check Status Details
pre-commit Failed (non-blocking) View

Pre-commit hooks: 4 passed, 45 failed, 7 skipped.

Test Results

linux-coverage: 88 passed, 0 skipped
Total: 88 passed, 0 skipped

Code Coverage

Coverage: 60.4%

No baseline available for comparison

Artifact Sizes

Artifact Size
QGroundControl 216.77 MB
QGroundControl-aarch64 176.67 MB
QGroundControl-installer-AMD64 134.66 MB
QGroundControl-installer-AMD64-ARM64 77.29 MB
QGroundControl-installer-ARM64 106.02 MB
QGroundControl-linux 334.68 MB
QGroundControl-mac 186.86 MB
QGroundControl-windows 186.87 MB
QGroundControl-x86_64 171.87 MB
No baseline available for comparison

Updated: 2026-05-20 22:11:14 UTC • Triggered by: Android

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.

1 participant