Bulk Request AVAILABLE_MODES instead of requesting each mode separately#14283
Bulk Request AVAILABLE_MODES instead of requesting each mode separately#14283av-remco wants to merge 2 commits intomavlink:masterfrom
Conversation
|
Thanks for your first pull request! 🎉 A maintainer will review this soon. Please ensure:
We appreciate your contribution to QGroundControl! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14283 +/- ##
=========================================
Coverage ? 26.06%
=========================================
Files ? 755
Lines ? 68006
Branches ? 31516
=========================================
Hits ? 17727
Misses ? 37502
Partials ? 12777
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Build ResultsPlatform Status
All builds passed. Pre-commit
Pre-commit hooks: 4 passed, 36 failed, 7 skipped. Test Resultslinux-coverage: 85 passed, 0 skipped Code CoverageCoverage: 59.1% No baseline available for comparison Artifact Sizes
Updated: 2026-04-17 07:44:54 UTC • Triggered by: Android |
Description
Improves what the comment at line 120 of
StandardModes.ccsuggestsI noticed that QGC does not wait for COMMAND_ACKs when sending MAV_CMD_REQUEST_MESSAGE with param1 = 435, i.e. the AVAILABLE_MODES message. These are sent 25 times on startup. PX4 SITL gets flooded by the requests and fails to ack each message due to a buffer overflow, with error
This PR uses a single MAV_CMD_REQUEST_MESSAGE to get all AVAILABLE_MODES. The operation is successful when the last mode is received. It fails when the COMMAND_ACK indicates a failure.
Re-requesting missing modes is out of scope for this PR, but a good future addition. Current implementation also does not cover this.
Type of Change
Testing
Both PX4 1.16.1 and ArduQuad. Not relevant for Ardu, since the message is not sent. Captured the .tlog from the build and analyzed this.
Platforms Tested
Flight Stacks Tested
Screenshots
Custom log monitoring tool

Before:
After:

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