Skip to content

vertical unit setting fact bug fix#14539

Open
n-sleeman wants to merge 1 commit into
mavlink:masterfrom
n-sleeman:alt-unit-bug
Open

vertical unit setting fact bug fix#14539
n-sleeman wants to merge 1 commit into
mavlink:masterfrom
n-sleeman:alt-unit-bug

Conversation

@n-sleeman

@n-sleeman n-sleeman commented Jun 16, 2026

Copy link
Copy Markdown

Description

Bug: vertical units handled by horizontal unit setting fact.
Fix: switched to use "vertical m" FactMetaData for Vertical unit setting fact

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/Build changes
  • Other

Testing

  • Tested locally
  • Added/updated unit tests
  • Tested with simulator (SITL)
  • Tested with hardware

Platforms Tested

  • Linux
  • Windows
  • macOS
  • Android
  • iOS

Flight Stacks Tested

  • PX4
  • ArduPilot

Screenshots

Checklist

  • I have read the Contribution Guidelines
  • I have read the Code of Conduct
  • My code follows the project's coding standards
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally

Related Issues


By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).

Copilot AI review requested due to automatic review settings June 16, 2026 16:22
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your first pull request! 🎉

A maintainer will review this soon. Please ensure:

  • CI checks pass
  • Code follows coding standards
  • Changes tested on relevant platforms

We appreciate your contribution to QGroundControl!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR appears to align altitude-related behavior across UI and data-model layers by switching some bindings to rawValue, updating the “in control” system id source, and changing altitude unit strings.

Changes:

  • Update QML bindings to use rawValue for altitude-related properties/ranges.
  • Switch control status tracking from gcs_main to sysid_in_control.
  • Change altitude-related “units” strings from "m" to "vertical m" in JSON fact/settings definitions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/Viewer3D/Viewer3DQml/Drones/DroneModelDjiF450.qml Uses altitudeRelative.rawValue for 3D model Z positioning
src/Vehicle/Vehicle.cc Uses sysid_in_control for _gcsMain updates
src/Vehicle/FactGroups/VehicleFact.json Updates altitude fact unit strings to "vertical m"
src/Settings/FlyView.SettingsGroup.json Updates guided altitude setting unit strings to "vertical m"
src/FirmwarePlugin/PX4/PX4FlightModeIndicator.qml Uses guidedMaximumAltitude.rawValue for slider max

"type": "double",
"decimalPlaces": 1,
"units": "m"
"units": "vertical m"
"type": "double",
"decimalPlaces": 1,
"units": "m"
"units": "vertical m"
"type": "double",
"decimalPlaces": 1,
"units": "m"
"units": "vertical m"
"shortDesc": "Minimum altitude allowed for guided mode actions like takeoff and altitude changes.",
"type": "double",
"units": "m",
"units": "vertical m",
"shortDesc": "Maximum altitude allowed for guided mode actions like takeoff and altitude changes.",
"type": "double",
"units": "m",
"units": "vertical m",
Layout.fillWidth: true
fact: controller.getParameterFact(-1, "GF_MAX_VER_DIST")
to: flyViewSettings.guidedMaximumAltitude.value
to: flyViewSettings.guidedMaximumAltitude.rawValue
Comment thread src/Vehicle/Vehicle.cc Outdated
Comment on lines +3281 to +3282
if (_gcsMain != controlStatus.sysid_in_control) {
_gcsMain = controlStatus.sysid_in_control;
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

⚠️ Build results unavailable — artifact download from one or more platform workflows failed (likely artifact retention expiry or transient API error). The combined report cannot be generated for this run.

See the Build Results workflow run for details.

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.20%. Comparing base (f29efd3) to head (1d52131).
⚠️ Report is 101 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14539      +/-   ##
==========================================
+ Coverage   25.47%   30.20%   +4.73%     
==========================================
  Files         769      772       +3     
  Lines       65912    66943    +1031     
  Branches    30495    31090     +595     
==========================================
+ Hits        16788    20220    +3432     
+ Misses      37285    32990    -4295     
- Partials    11839    13733    +1894     
Flag Coverage Δ
unittests 30.20% <ø> (+4.73%) ⬆️

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


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31a4b0a...1d52131. 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.

Comment thread src/FirmwarePlugin/PX4/PX4FlightModeIndicator.qml Outdated
@github-actions github-actions Bot removed the QML label Jun 17, 2026
@n-sleeman n-sleeman force-pushed the alt-unit-bug branch 7 times, most recently from 86237e8 to f92bc59 Compare June 17, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants