Skip to content

Fix APM takeoff when vehicle is already armed and on the ground - #15063

Open
eris-ismajli wants to merge 2 commits into
mavlink:masterfrom
eris-ismajli:fix/apm-already-armed-takeoff
Open

eris-ismajli wants to merge 2 commits into
mavlink:masterfrom
eris-ismajli:fix/apm-already-armed-takeoff

Conversation

@eris-ismajli

@eris-ismajli eris-ismajli commented Sep 9, 2026

Copy link
Copy Markdown

Description

Fixes an issue where APM takeoff does nothing if the vehicle is already armed while on the ground.

Previously, APMFirmwarePlugin::startTakeoff() only switched to Takeoff mode and attempted to arm the vehicle when it was disarmed. If the vehicle was already armed, the takeoff sequence was skipped entirely.

This change ensures that:

  • The vehicle switches to Takeoff mode regardless of its arming state.
  • No redundant arm command is sent when the vehicle is already armed.
  • The existing behavior for vehicles that are already flying is preserved.

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

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.82%. Comparing base (f29efd3) to head (bc292b4).
⚠️ Report is 373 commits behind head on master.

Files with missing lines Patch % Lines
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc 0.00% 6 Missing ⚠️

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

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15063      +/-   ##
==========================================
+ Coverage   25.47%   34.82%   +9.35%     
==========================================
  Files         769      950     +181     
  Lines       65912    85902   +19990     
  Branches    30495    39594    +9099     
==========================================
+ Hits        16788    29917   +13129     
+ Misses      37285    36015    -1270     
- Partials    11839    19970    +8131     
Flag Coverage Δ
unittests 34.82% <0.00%> (+9.35%) ⬆️

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

Files with missing lines Coverage Δ
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc 26.47% <0.00%> (+6.25%) ⬆️

... and 682 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 b2254eb...bc292b4. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 9, 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: 52 passed, 0 skipped
linux-coverage-unit: 190 passed, 0 skipped
linux-sanitizers-integration: 31 passed, 0 skipped
linux-sanitizers-unit: 190 passed, 0 skipped
Total: 463 passed, 0 skipped

Code Coverage

Coverage: 71.2%

No baseline available for comparison

Artifact Sizes

Artifact Size
QGroundControl 253.15 MB
QGroundControl-aarch64 177.36 MB
QGroundControl-installer-AMD64 128.45 MB
QGroundControl-installer-AMD64-ARM64 70.83 MB
QGroundControl-installer-ARM64 99.57 MB
QGroundControl-linux 84.77 MB
QGroundControl-mac 84.77 MB
QGroundControl-x86_64 189.62 MB
No baseline available for comparison

Updated: 2026-09-09 15:01:36 UTC • Commit: bc292b4 • 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.

1 participant