Repository navigation
Conversation
The output table was built from the mixer's motor count before the protocol was looked at, so a Smart ESC on a UART still took the first motor pad and its timer, and the servos wired there went silent unless the slot was moved to an unused pad by hand with timer_output_mode.
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoStop reserving motor pads for serial ESC protocols
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all |
|
RAM / Flash usage vs. base commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #12140 251 targets built. Find your board's
|
|
Thanks for this. Was any testing done to ensure it doesn't break everything that's not an Avian? |
|
@sensei-hacker Nothing changes for a motor that has a timer waveform: the output table takes |
I think it would be good to verify that. It's clear what we would EXPECT to happen. But just to verify. |
|
@sensei-hacker Direct check done on the bench, TBS Lucid H7 Wing on this change with every timer on AUTO, reading MSP2_INAV_OUTPUT_ASSIGNMENT after each reboot:
So with a protocol that uses a timer the table is the one INAV built before; only the serial-bus case moves. |
The output table is built from the mixer's motor count before the motor protocol is looked at, so a Spektrum Smart ESC on a UART still took the first motor-capable pad and, with it, the timer that pad shares with its neighbours. On a TBS Lucid H7 Wing with an airplane mixer that is S1, and S2 went with it: the elevator and rudder servos wired there stayed silent until the phantom motor was parked on an unused pad with
timer_output_mode, which nobody can be expected to work out from "my servos don't move".With a protocol that has no timer waveform the table now reserves no motor pad, and the servos take the pads that can drive a servo from the first one. Nothing changes for PWM, Oneshot, Multishot, Brushed and DShot.
pwmInitMotors()already returned before touching the timers for such a protocol, and its SRXL2 check still asks for one assigned port per motor; the output assignment reported over MSP simply has no motor entry.A model set up for SRXL2 on 10.0.0-rc1 or rc2 has its servos one or two pads further along than this build assigns them (two on boards where the first motor pad shares its timer, like the Lucid). The docs now say to check every servo output after updating, or to set
timer_output_modeto MOTORS for the timer of the old motor pad, which keeps the layout the model was wired for; a model that already used that workaround is unchanged. Worth a line in the release notes.The Configurator draws the same assignment in the Mixer tab's Output Mapping preview while the rules are being edited; iNavFlight/inav-configurator#2831 teaches that preview the same rule and should go in together with this.
Testing
MSP2_INAV_OUTPUT_ASSIGNMENTlists S1 to S8 as servos 1 to 8 and no motor. Before the change the motor took S1, S2 was lost and the servos started at S3; the model had been parked withtimer_output_mode 0 MOTORS, which is no longer needed.