Skip to content

fix(ArduPlane): gate Step 14 motor test on QuadPlane enable - #2296

Draft
nflyernz wants to merge 1 commit into
ArduPilot:masterfrom
nflyernz:fix/arduplane-motor-test-gating
Draft

nflyernz wants to merge 1 commit into
ArduPilot:masterfrom
nflyernz:fix/arduplane-motor-test-gating

Conversation

@nflyernz

Copy link
Copy Markdown
Contributor

Description

Fix ArduPlane Walkthrough Audit 5 finding F14: the conventional fixed-wing Plane configuration workflow displays a multicopter motor-test interface in Step 14 (14_esc.param), including a Quad X motor diagram and motor-test controls.

The motor-test plugin should only appear for ArduPlane when QuadPlane is enabled.

Changes

  • Add a conditional if expression to the existing Step 14 motor_test plugin registration.
  • Display the plugin only when the connected FC reports Q_ENABLE=1.
  • Do not infer QuadPlane enablement from the presence of Q_FRAME_CLASS or other Q_* parameters.
  • Hide the plugin when Q_ENABLE is zero, unsupported, or unavailable.
  • Preserve the Step 14 ESC and servo configuration workflow.
  • Leave ArduCopter motor-test registration and motor-command behaviour unchanged.

This uses AMC's existing conditional plugin mechanism without introducing new GUI infrastructure or changing flight-controller parameters.

Regression coverage

Added focused tests using the real ParameterEditor.get_plugin() processing path, covering:

  • Conventional Plane with Q_ENABLE=0.
  • Enabled QuadPlane with Q_ENABLE=1.
  • Unsupported or unavailable Q_ENABLE.
  • Presence of Q_FRAME_CLASS without QuadPlane enablement.
  • Changes to the FC's reported Q_ENABLE value.
  • Unchanged ArduCopter motor-test availability.

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 documentation changes included in this narrowly scoped fix
  • 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:

  • 737 focused pytest tests passed.
  • Ruff passed.
  • Focused Pylint passed.
  • Targeted ty passed.
  • Configuration-step schema validation passed.
  • git diff --check passed.

GUI test limitation: The macOS Tkinter GUI suite could not run because Tk aborted while creating the root window, before the plugin tests executed. The focused Parameter Editor tests passed, but end-to-end GUI behaviour has not been manually verified.

This PR is intentionally limited to Step 14 plugin availability. Other conventional Plane / QuadPlane workflow findings remain separate.

Signed-off-by: nflyernz <319460892+nflyernz@users.noreply.github.com>
@amilcarlucas
amilcarlucas force-pushed the fix/arduplane-motor-test-gating branch from 12d8eb2 to 8c46efd Compare November 22, 2026 21:46
@amilcarlucas

Copy link
Copy Markdown
Collaborator

I think this is a nice fix. Is it still a draft or can it be reviewed?

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.

2 participants