Skip to content

Feat/quadplane tilt tri control surfaces - #2397

Draft
Allister779 wants to merge 4 commits into
ArduPilot:masterfrom
Allister779:feat/quadplane-tilt-tri-control-surfaces
Draft

Allister779 wants to merge 4 commits into
ArduPilot:masterfrom
Allister779:feat/quadplane-tilt-tri-control-surfaces

Conversation

@Allister779

Copy link
Copy Markdown
Contributor

Description

Adds QuadPlane tilt-rotor tricopter support to the ArduPlane workflow: two vehicle templates, a new configuration step for adjusting control surfaces and tilt servos, and a fix for QuadPlane ESC protocol import.

New step: 12_control_surfaces_and_tilt_servos.param

The ArduPlane workflow assigned servo functions in step 11, but had no step for setting servo direction, range and trim, or for setting up the tilt mechanism. The new step comes right after 11_servo_outputs.param:

  • Step 11 keeps the output functions and the tilt mechanism (Q_TILT_ENABLE, Q_TILT_MASK, Q_TILT_TYPE). Uploading it reboots the flight controller, which makes the Q_TILT_* adjustment parameters available.
  • Step 12 holds SERVOx_MIN/MAX/TRIM/REVERSED, SERVO_AUTO_TRIM, MIXING_GAIN/OFFSET, Q_TILT_RATE_UP/DN, Q_TILT_MAX and Q_TILT_YAW_ANGLE.
    • It opens with a props-off warning and the setup procedure from the tilt-rotor wiki: set the tilt servo reversal so the rotors point forward in MANUAL and straight up in QSTABILIZE, then fine-tune MIN/MAX. In FBWA, check that the control surfaces move to correct the attitude.
    • It applies to every plane: the tilt parameters are only imported when they exist on the flight controller.
  • Documented in TUNING_GUIDE_ArduPlane.md section 6.11.
  • Step 11's wiki links returned 404 and now point to servo-functions.html.

Renumbering ArduPlane steps 12–62 to 13–63

  • 63 was unused, so steps 64–70 (including 70_everyday_use.param) keep their numbers.
  • Each moved step lists its previous filename in old_filenames, so existing projects are renamed when opened.
  • I did not use .github/skills/configuration-steps-reorder/scripts/param_reorder.py. It only handles the ArduCopter sequence and does a repository-wide find-and-replace, and because Plane and Copter share step filenames, it would have renamed Copter files too.
  • ArduPlane step numbers now differ from ArduCopter's, as Heli's already do.
  • Updated the hard-coded Plane filenames in the tuning report (data_model_parameter_editor.py), the PID adjustment tool (param_pid_adjustment_update.py), ARCHITECTURE_autotune_accel_backoff.md and the tests.

Project format 2 → 3 (backend_filesystem_migration.py)

  • ArduPlane: the migration moves the servo adjustments and tilt values from the project's step 11 into the new step 12. Restoring step 12 from the empty template instead would make the upload overwrite the user's trims and reversals with defaults.
    • The step file is only created when the project's active configuration steps define it, so a project-local older configuration_steps_ArduPlane.json is left alone.
  • Other vehicle types: only the version number changes. Format-2 projects no longer get every missing step restored from the template, which would have brought back steps the user deliberately removed.
  • v1 → v2 fix: that migration now resolves its destination filenames through old_filenames, so it writes to the current step name. Without this, the renumbering would have made it write to a legacy name that the later rename refuses to overwrite, leaving the user's moved values in an orphaned file.
  • All 34 packaged templates were migrated with scripts/migrate_vehicle_templates_format_version.py, which confirmed that every effective parameter value is unchanged.

Fix: ArduPlane ESC protocol import

ArduPlane has no MOT_PWM_TYPE; QuadPlanes use Q_M_PWM_TYPE. The component importer only read MOT_PWM_TYPE, so importing any QuadPlane reset the ESC protocol to Normal and skipped the DShot motor-pole import. The ESC log-analysis checks had the same mistake. A new helper, get_esc_pwm_type_param_name(), returns the right parameter name for the vehicle type.

New vehicle templates

  • ArduPlane/tilt_tri_quadplane: generic vectored-yaw tilt-rotor tricopter (Q_FRAME_CLASS=7, Q_TILT_TYPE=2). The two front motors tilt (Q_TILT_MASK=3) and the rear motor stays fixed.
    • Motors on outputs 1–3, tilt servos on 5–6, ailerons, elevator and rudder on 7–9.
    • DShot300 with bidirectional DShot and an RPM-based harmonic notch.
    • No preset products.
  • ArduPlane/HeeWing_T1-S_Ranger_VTOL: the same frame layout for the HeeWing T1-S Ranger, on a Matek H743-WLITE with MAVLink over ELRS.
    • This needed two changes to configuration_steps_ArduPlane.json. A MAVRadio RC receiver keeps its serial port on MAVLink2 instead of RCIN, because RC and telemetry share one port.
    • The Q_A_ACC*_MAX values derived from propeller size are capped at the ArduPlane QuadPlane defaults, so small propellers no longer raise the limits above them.

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
  • Documentation updated if needed
  • No breaking changes or properly documented

Breaking change: projects opened with this version are upgraded to format 3, and earlier AMC releases can't fully open them. Users who might switch back should copy their project folder first.

Testing

Describe how you tested these changes:

  • Unit tests pass

  • Integration tests pass

  • Manual testing performed

  • Tested on flight controller hardware

  • Full test suite: run under xvfb-run, then compared against an unmodified checkout of the parent commit. No new failures.

    • test_verify_packaged_modules.py::test_frozen_archive_is_rejected_when_a_plugin_is_missing fails on both because PyInstaller isn't installed locally.
  • GUI tests (tests/gui_frontend_tkinter_*.py): 51 passed, 5 skipped.

  • New tests:

    • QuadPlane ESC protocol import, and the Plane ESC log-analysis diagnosis.
    • v2 → v3 migration: values move and survive the renames; other vehicles are untouched; an interrupted run is idempotent.
    • New step position and definition; tilt-tri template layout and step split.
  • Linting: ruff, pylint and pyright are clean on the changed files.

    • mypy reports three Windows-only attributes (CREATE_NO_WINDOW, DETACHED_PROCESS, windll) in files this PR doesn't touch, on Linux.
  • Manual: the installed build starts. The new step has not been exercised in the GUI, in SITL or on hardware.

🤖 Generated with Claude Code

@Allister779
Allister779 force-pushed the feat/quadplane-tilt-tri-control-surfaces branch 2 times, most recently from c74c992 to a1aba2a Compare November 20, 2026 23:54
Allister779 and others added 4 commits November 22, 2026 16:55
…e template

Add an ArduPlane template for the HeeWing T1-S Ranger VTOL, a vectored-yaw
tilt-rotor tricopter (Q_FRAME_CLASS=7, Q_TILT_TYPE=2) whose two front
motors tilt (Q_TILT_MASK=3) while the rear motor stays fixed, on a Matek
H743-WLITE with MAVLink over ExpressLRS.

The template needs two changes to the ArduPlane configuration steps:
- A MAVRadio RC receiver keeps its serial port on MAVLink2 instead of
  switching it to RCIN, because RC and telemetry share one port.
- The Q_A_ACC*_MAX values derived from the propeller size are capped at the
  ArduPlane QuadPlane defaults, so small propellers no longer raise them
  above those defaults.

Signed-off-by: Allister779 <schreiber_a@proton.me>
Set FLTMODE_CH to 8 so a 3-position switch selects QSTABILIZE, FBWA and
QRTL, and test that MANUAL is not on the mode switch: in MANUAL a
tilt-rotor tilts its rotors fully forward at 90 degrees per second.

Signed-off-by: Allister779 <schreiber_a@proton.me>
ArduPlane has no MOT_PWM_TYPE; QuadPlanes use Q_M_PWM_TYPE. The component
importer only read MOT_PWM_TYPE, so importing any QuadPlane reset the ESC
protocol to Normal and skipped the DShot motor-pole import. The log
analysis ESC checks had the same mistake in two places.

Add get_esc_pwm_type_param_name() and use it for the documentation check,
the ESC protocol import and the motor-pole import. Use the vehicle-specific
parameter name in the ESC availability diagnosis and the DShot output-rate
check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Allister779 <schreiber_a@proton.me>
…ri QuadPlane template

Add 12_control_surfaces_and_tilt_servos.param to the ArduPlane workflow,
right after 11_servo_outputs.param. Step 11 keeps the output functions and
the tilt mechanism (Q_TILT_ENABLE, Q_TILT_MASK, Q_TILT_TYPE); its upload
reboots the flight controller and exposes the tilt parameters. Step 12
holds the SERVOx_MIN/MAX/TRIM/REVERSED, SERVO_AUTO_TRIM, mixing and the
Q_TILT rate, max and yaw-angle adjustments, with a props-off warning and
the tilt-rotor setup procedure. Document it in TUNING_GUIDE_ArduPlane.md
section 6.11 and fix the step 11 wiki links, which returned 404.

Renumber ArduPlane steps 12-62 to 13-63 (63 was free, so 64-70 keep their
numbers) and record each old filename in old_filenames. The repository
reorder script was not used because it only knows the Copter sequence and
renames shared filenames across all vehicles. Update the Plane-specific
filenames in the tuning report, the PID adjustment tool, the tests and the
autotune accel back-off architecture notes.

Bump the project format to 3. For ArduPlane, the v2 to v3 migration moves
the servo adjustments and tilt values from step 11 into the new step, so
existing values are kept instead of being overwritten by template
defaults. The new step is only created when the active configuration
defines it. Format-2 projects no longer get every missing step restored
from the template, which would have resurrected steps users removed. The
v1 to v2 migration now resolves its destination filenames through
old_filenames, so values are written to the current step instead of to a
legacy file that the later rename refuses to overwrite. Migrate all
packaged templates to format 3.

Add the generic tilt_tri_quadplane template: a vectored-yaw tilt-rotor
tricopter (Q_FRAME_CLASS=7, Q_TILT_TYPE=2) whose two front motors tilt
(Q_TILT_MASK=3) while the rear motor stays fixed, with motors on outputs
1-3, tilt servos on 5-6, control surfaces on 7-9, DShot300 with
bidirectional DShot and no preset products. Its tests also cover the
airframe-independent checks of the HeeWing T1-S Ranger VTOL template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Allister779 <schreiber_a@proton.me>
@Allister779
Allister779 force-pushed the feat/quadplane-tilt-tri-control-surfaces branch from 2791d19 to 8f2f9b4 Compare November 22, 2026 23:08
@Allister779
Allister779 marked this pull request as draft November 23, 2026 02:57

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.

1 participant