Repository navigation
Conversation
An Avian calibrated to INAV's endpoints, brought up to exactly 20 % and held there for about two seconds treats any rise after that, even one microsecond, as a failed start: the motor stops until the throttle goes back to zero. 1200 us is the only motor value on that step, and the default nav_fw_min_thr, so it goes out as 1199. The Smart ESC page says why and what is not covered.
|
ⓘ 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 QodoAvoid Avian motor cutoff at 20% SRXL2 throttle
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
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 keep summaries lean with Findings visible per group, which tucks the rest behind a View link |
|
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 #12136 251 targets built. Find your board's
|
A Spektrum Avian driven over SRXL2 can stop its motor in flight and keep it stopped until the throttle goes back to zero. I traced it to one throttle value: exactly 20.0 %.
What happens
On an Avian 70 A calibrated from INAV, with the propeller off:
It behaves like the start-up protection the Avian manual describes ("If the throttle is more than 20%, the throttle stick must be moved back to the bottom position before the ESC will allow a restart"), firing on a motor that is already running.
Shifting the raw channel value one unit at a time, the trap covers raw 13558 to 13620: the ESC's 20.0 % step, 64 units wide. With INAV's calibration endpoints, 1200 us (13568) is the only microsecond inside it; 1199 us is 13504 and 1201 us is 13632.
Why it matters for INAV
nav_fw_min_thrdefaults to 1200. A navigation mode that starts from a stopped motor and sits at minimum throttle for two seconds before asking for more would leave the aircraft gliding.The change
srxl2MotorUpdate()sends 1200 us as 1199 us (19.9 %). The value comes from the calibration endpoints, so the dependency is visible in the code. The Smart ESC page gets a short section on it, including what is not covered: an ESC calibrated to other endpoints has its 20 % somewhere else, which I did not measure.Tests (bench, Avian 70 A, propeller off, throttle through MSP with the board disarmed)
I also reproduced the stop in a HITL flight with this ESC connected (X-Plane driving INAV, INAV driving the real ESC), holding 1200 us and then raising it, and saw the fix keep the motor running in the same flight.
Size: MATEKF405 and BLUEBERRYF435WING +16 B of flash, MATEKH743 +0, RAM unchanged. The driver is not built on F7. Unit tests pass; the SRXL2 driver has none of its own.