Skip to content

[WIP] Betaflight-style "Reorder motors" dialog, as an alternative to the Mixer Wizard - #2865

Draft
GrumpyOldNerd wants to merge 1 commit into
iNavFlight:maintenance-11.xfrom
GrumpyOldNerd:feature/bf-motor-reorder
Draft

GrumpyOldNerd wants to merge 1 commit into
iNavFlight:maintenance-11.xfrom
GrumpyOldNerd:feature/bf-motor-reorder

Conversation

@GrumpyOldNerd

Copy link
Copy Markdown

Work in progress, no code yet. This draft is here so the plan is visible early and anyone can say if it's heading the wrong way.

What and why

Pilots coming from Betaflight know the "Reorder motors" dialog in its Motors tab. First you confirm that the props are off. Then one motor runs at a time, and you click where it sits on the frame picture. At the end you either save or start over. We'd like to offer the same flow in INAV.

Not a replacement for the Mixer Wizard

This is not meant to compete with the existing Mixer Wizard, and it doesn't replace it. DzikuVx wrote the first version in 2020 and Ray Morris reworked it this year. It works, and we want to respect that work, so it stays exactly as it is.

What we want to add is an alternative for people who are used to how Betaflight does it. Some code could be shared, such as the motor positions per preset or applying the result by reordering the mixer rules. Where that's possible we'd move it into a shared module instead of copying it, without changing how the Mixer Wizard behaves.

Plan

  • Warning screen with an explicit "props are off" checkbox. Nothing moves until it's ticked.
  • One motor at a time, driven by MSP2_INAV_MOTOR_WIZARD_START from MOTOR WIZARD - move driving motor for motor wizard to FW inav#12247. The motor twitches in short bursts that the firmware times, and each sequence ends by itself after 3 s. The dialog repeats the command while the user is still looking for the motor.
    • There is no continuous spin like in Betaflight. Ray asked for spins to be as short as possible, and a sequence timed by the firmware also stops when the link drops.
  • Click the motor on the frame picture to go to the next one.
  • "Start over" without closing the dialog. "Save" only becomes available once every motor is assigned exactly once.
  • Coaxial frames (Octo X8, Y6, Y4), with the bottom motors as separate click targets on a smaller radius, like Betaflight does.
    • The Mixer Wizard leaves these frames out on purpose, because two motors share one position. With a single motor twitching and separate top and bottom targets it should be clear which one moves. We'll confirm that on the bench.
  • Esc, a click outside the dialog, a tab change or a disconnect stops everything via MSP2_INAV_MOTOR_WIZARD_STOP.
  • Saving reorders the mixer rules (same as the Mixer Wizard), then saves and reboots.
    • The dialog will note that loading a preset or changing a timer's output mode afterwards means running it again.
  • Only offered when the firmware has the motor wizard commands, hidden otherwise.
  • Unit test for the reordering: every frame, plus missed and double clicks.
  • Test in SITL against a #12247 build, then on the bench without props.

Proposed place: the Outputs tab, next to the motor test, because that's the closest match to Betaflight's Motors tab. If you'd rather have it in the Mixer tab next to the Mixer Wizard, that works too.

Done so far

Depends on

🤖 Generated with Claude Code

Placeholder commit for the draft PR. No code yet; the plan is in the
PR description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 3, 2026

Copy link
Copy Markdown

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