Skip to content

Mixer: the output map reserves no pad for a Smart ESC motor - #2831

Open
MrScothh wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
MrScothh:fix/srxl2-no-motor-pad
Open

MrScothh wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
MrScothh:fix/srxl2-no-motor-pad

Conversation

@MrScothh

@MrScothh MrScothh commented Oct 9, 2026

Copy link
Copy Markdown

The Output Mapping preview in the Mixer tab simulates the firmware's assignment of pads to motors and servos while the rules on screen are not saved yet. iNavFlight/inav#12140 makes the firmware reserve no motor pad for a protocol with no timer waveform, where the ESC is driven over a UART, so the simulation now passes no motors in that case and the servos are drawn from the first pad, as the board will assign them. The tab loads the ESC protocol with the rest of its data to know which case it is in; the SRXL2 protocol number and the check live in fc.js, next to the protocol table.

With a saved configuration the tab keeps showing what the board reports, so the preview and the board agree in both states. This should go in together with the firmware change: on a board still running 10.0.0-rc1 or rc2, the preview after an unsaved edit would show Servo 1 on a pad that firmware still gives to the motor, until the next save and reboot puts the board's own table back on screen.

Testing

TBS Lucid H7 Wing (Avian Smart ESC on UART8, airplane mixer with servos 1 to 8) running the firmware change, every timer on AUTO:

  • fresh Mixer tab, board-reported table: S1 to S8 are Servo 1 to Servo 8, S9 to S13 empty, no motor;
  • after editing a rule's weight without saving, the local preview shows the same table; before this change it drew Motor 1 on S1 and shifted the servos.

yarn test: as on maintenance-10.x on Windows, only the MZTC sender scan fails, for the path separator (#2826). Trial merges with #2814, #2815, #2828 and #2818 are clean.

Matches the firmware, which no longer takes a motor pad for a protocol
without a timer waveform; the tab now loads the ESC protocol to know.
@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Align Mixer output preview with UART-driven Smart ESC assignments

🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Load the ESC protocol when opening Mixer so its output preview has current configuration data.
• Reserve no motor pad for SRXL2, allowing unsaved servo edits to match firmware assignments.
• Keep using board-reported assignments when a direct output map is available.
Diagram

graph TD
    Mixer["Mixer Tab"] --> MSP["MSP Helper"] --> FC["FC Config"] --> Check{"Uses timers?"} --> Mapping["Output Mapping"] --> Preview["Pad Preview"]
    MSP -->|board assignments| Preview
Loading
High-Level Assessment

The focused protocol check is appropriate: it matches the firmware distinction without changing the shared output-mapping algorithm or replacing board-reported assignments. Passing zero motors reuses the existing servo assignment behavior.

Files changed (2) +9 / -1

Bug fix (2) +9 / -1
fc.jsIdentify SRXL2 as a motor protocol without timer outputs +5/-0

Identify SRXL2 as a motor protocol without timer outputs

• Adds the SRXL2 protocol number and a helper that checks whether the configured motor protocol uses timer outputs. This gives the Mixer preview a shared place to determine whether a motor needs a pad.

js/fc.js

mixer.jsAvoid reserving a motor pad in the SRXL2 preview +4/-1

Avoid reserving a motor pad in the SRXL2 preview

• Loads advanced configuration during Mixer initialization so the ESC protocol is known before rendering. Passes zero motors to the simulated output map for SRXL2, while retaining the existing board-reported direct-assignment path.

tabs/mixer.js

@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Configurator test build ready — commit 6119856

Download build artifacts for PR #2831

Available platforms (scroll to the Artifacts section at the bottom of the run page):

  • Windows x64 (ZIP, MSI) and x32 (ZIP, MSI)
  • macOS arm64 (ZIP, DMG) and x64 (ZIP, DMG)
  • Linux x64 (DEB, RPM, ZIP) and aarch64 (DEB, RPM, ZIP)

A GitHub login is required to download artifacts. Build is for testing only.

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