Skip to content

PX4FirmwarePlugin: use correct unset param1#14605

Open
julianoes wants to merge 1 commit into
masterfrom
pr-fix-pitch
Open

PX4FirmwarePlugin: use correct unset param1#14605
julianoes wants to merge 1 commit into
masterfrom
pr-fix-pitch

Conversation

@julianoes

@julianoes julianoes commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

NAV_TAKEOFF param1 allows to set the minimum pitch. Generally, when not setting a param it should be set to NAN or 0. The sentinel value -1 is not in the spec.

Note that this value is not used in PX4 anyway.

Also, unused param2 can be NAN instead of 0 which is generally preferred.

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

PX4/PX4-Autopilot#27899


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

@julianoes

Copy link
Copy Markdown
Contributor Author

Testing pending Qt download...

@julianoes

Copy link
Copy Markdown
Contributor Author

PX4 SITL tested.

@github-actions

github-actions Bot commented Jul 15, 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: 0 passed, 0 failed, 0 skipped.

Test Results

linux-coverage-integration: 27 passed, 0 skipped
linux-coverage-unit: 105 passed, 0 skipped
Total: 132 passed, 0 skipped

Code Coverage

Coverage Baseline Change
66.5% 66.6% -0.0%

Artifact Sizes

Artifact Size Δ from master
QGroundControl 221.84 MB -4.47 MB (decrease)
QGroundControl-aarch64 179.43 MB No change
QGroundControl-installer-AMD64 138.39 MB +0.01 MB (increase)
QGroundControl-installer-AMD64-ARM64 80.66 MB -0.00 MB (decrease)
QGroundControl-installer-ARM64 109.21 MB +0.00 MB (increase)
QGroundControl-linux 87.09 MB -78.80 MB (decrease)
QGroundControl-mac 87.09 MB No change
QGroundControl-windows 86.15 MB No change
QGroundControl-x86_64 191.65 MB +0.00 MB (increase)
Total size decreased by 83.26 MB

Updated: 2026-07-15 03:48:42 UTC • Commit: 6637cbc • Triggered by: Linux

NAV_TAKEOFF param1 allows to set the minimum pitch. Generally, when not
setting a param it should be set to NAN or 0. The sentinel value -1 is
not in the spec.

Note that this value is not used in PX4 anyway.

Also, unused param2 can be NAN instead of 0 which is generally preferred.
@DonLakeFlyer DonLakeFlyer added this to the Release V5.1 milestone Jul 15, 2026
@DonLakeFlyer

Copy link
Copy Markdown
Contributor

@hamishwillee Mavlink spec says nothing about how to deal with not passing various MAV_CMD_NAV_TAKEOFF params. Is there really a spec that says NAN is always not used. If so, I believe ardupilot tends to puke on NAN in various commands.

@julianoes Is this fact in px4 firmware side version agnostic? Not something that change somewhere along the way?

@julianoes

Copy link
Copy Markdown
Contributor Author

I believe ardupilot tends to puke on NAN in various commands.

It used to but that's mostly fixed up by now. In this case that doesn't matter as this is the PX4 plugin.

We started rejecting invalid commands on the PX4 side which triggered QGC takeoff to fail. So obviously we had to revert the strict check on the PX4 side. However, instead of just ignoring that QGC sends something non-compliant, I opted to fix it.

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