Skip to content

fix(ArduPlane): review actual RTL altitude in everyday step - #2294

Draft
nflyernz wants to merge 1 commit into
ArduPilot:masterfrom
nflyernz:fix/arduplane-rtl-altitude-review
Draft

nflyernz wants to merge 1 commit into
ArduPilot:masterfrom
nflyernz:fix/arduplane-rtl-altitude-review

Conversation

@nflyernz

Copy link
Copy Markdown
Contributor

Description

Correct ArduPlane Step 70 (70_everyday_use.param) so the generic Plane templates no longer propose the obsolete RTL_ALT,3500 setting.

ArduPlane 4.7.2 uses RTL_ALTITUDE, expressed in metres above HOME. Its firmware default is 100 m, while -1 means maintain current altitude.

Rather than impose either the old 35 m setting or the firmware default, AMC should present the connected flight controller's actual RTL_ALTITUDE value for user review.

Changes

  • Remove RTL_ALT,3500 from the empty_4.7.x and normal_plane Step 70 templates.
  • Add a conditional RTL_ALTITUDE entry using AMC's existing add_parameters mechanism.
  • Copy the connected FC value without prescribing a replacement altitude.
  • Preserve an existing saved RTL_ALTITUDE value.
  • Do not invent a value when the parameter is unavailable.
  • Leave RTL_CLIMB_MIN and Copter/Rover configurations unchanged.

This affects newly created generic Plane template steps only. Existing user projects are not silently migrated or modified.

Regression coverage

Added tests/test_arduplane_rtl_altitude_review.py, covering template contents, actual FC values of 100, 35 and -1 m, saved-value preservation, missing FC parameters, and vehicle-specific isolation.

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our [coding standards](../CONTRIBUTING.md#code-quality--standards)
  • Documentation updated if needed — no user-facing documentation changes required
  • No breaking changes or properly documented

Testing

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Local validation reported by Codex:

  • 414 focused pytest cases passed.
  • Ruff passed.
  • Focused Pylint passed.
  • Targeted ty passed.
  • git diff --check passed.
  • Isolated worktree clean.

The focused tests exercise AMC's existing configuration-step processing, including copying the live FC parameter value and preserving saved settings. Full integration and hardware testing have not been reported.

Firmware reference: ArduPlane 4.7.2, ArduPlane/Parameters.cpp and ArduPlane/config.h.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 40683293017

Coverage remained the same at 93.542%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 29623
Covered Lines: 27710
Line Coverage: 93.54%
Relevant Branches: 8922
Covered Branches: 7790
Branch Coverage: 87.31%
Branches in Coverage %: No
Coverage Strength: 2.79 hits per line

💛 - Coveralls

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants