Skip to content

fix: Stale SimpleMissionItem param metadata causing sliders with -DBL_MAX min / odd values#14492

Open
jnomikos wants to merge 2 commits into
mavlink:masterfrom
jnomikos:dev-mission-item-stale-fix
Open

fix: Stale SimpleMissionItem param metadata causing sliders with -DBL_MAX min / odd values#14492
jnomikos wants to merge 2 commits into
mavlink:masterfrom
jnomikos:dev-mission-item-stale-fix

Conversation

@jnomikos

@jnomikos jnomikos commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

When creating a waypoint and then switching the type to GIMBAL_MANAGER_PITCHYAW, GRIPPER_ACTION, CONTROL_MOUNT, GUIDED_LIMITS, etc. There will be sliders which show -DBL_MAX value for minimum, or -Infinity, Infinity for min and max. This is because stale data from the previous mission item persists when selecting the new one and ends up as those slider min / max. Thus, the behavior depends on what waypoint you switch from.

To fix this (and avoid any issues like this appearing again), I added a new method which clears param metadata in simple mission item, and it will clear the metadata whenever _rebuildFacts is called.

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

image image image image

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).

…_MAX minimums / odd values.

When facts rebuild, clear param metadata fully to prevent stale min /
max from creating sliders on mission items without user defined values
with weird min / max.
Copilot AI review requested due to automatic review settings June 8, 2026 00:54

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.

Adds a helper to reset parameter FactMetaData before rebuilding mission item facts, ensuring stale metadata doesn’t linger across rebuilds.

Changes:

  • Introduced _clearParamMetaData() in SimpleMissionItem
  • Invoked _clearParamMetaData() at the start of _rebuildFacts()

Reviewed changes

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

File Description
src/MissionManager/SimpleMissionItem.h Declares new helper for clearing param metadata
src/MissionManager/SimpleMissionItem.cc Implements helper and calls it before rebuilding facts

Comment thread src/MissionManager/SimpleMissionItem.h
Comment thread src/MissionManager/SimpleMissionItem.cc
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.76%. Comparing base (f29efd3) to head (281dbed).
⚠️ Report is 59 commits behind head on master.

Files with missing lines Patch % Lines
src/MissionManager/SimpleMissionItem.cc 30.00% 0 Missing and 7 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14492      +/-   ##
==========================================
+ Coverage   25.47%   28.76%   +3.29%     
==========================================
  Files         769      767       -2     
  Lines       65912    66321     +409     
  Branches    30495    30593      +98     
==========================================
+ Hits        16788    19080    +2292     
+ Misses      37285    34250    -3035     
- Partials    11839    12991    +1152     
Flag Coverage Δ
unittests 28.76% <30.00%> (+3.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/MissionManager/SimpleMissionItem.h 80.00% <ø> (ø)
src/MissionManager/SimpleMissionItem.cc 50.57% <30.00%> (-0.31%) ⬇️

... and 272 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 f9edb00...281dbed. 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

github-actions Bot commented Jun 8, 2026

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: 2 passed, 46 failed, 7 skipped.

Test Results

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

Code Coverage

Coverage: 62.8%

No baseline available for comparison

Artifact Sizes

Artifact Size
QGroundControl 219.04 MB
QGroundControl-aarch64 178.28 MB
QGroundControl-installer-AMD64 136.99 MB
QGroundControl-installer-AMD64-ARM64 79.90 MB
QGroundControl-installer-ARM64 108.42 MB
QGroundControl-linux 191.43 MB
QGroundControl-mac 191.43 MB
QGroundControl-windows 189.61 MB
QGroundControl-x86_64 174.20 MB
No baseline available for comparison

Updated: 2026-06-08 01:35:36 UTC • Commit: 281dbed • Triggered by: Linux

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.

2 participants