Conversation
The DSHOT output turned every value below the configured motor idle into the DSHOT stop command, while the analog protocols hand such a value to the ESC unchanged. In the motor test a slider below "Motors IDLE power" therefore did nothing with DSHOT but turned the motor with MULTISHOT. The idle value describes the lowest throttle in flight, it does not mean "motor off". The value the mixer writes when a motor shall not turn is motorZeroCommand, which is also what motor stop, the disarmed state and areMotorsRunning() use. Use that as the stop threshold, so DSHOT scales every request above min_command just like the analog protocols do. The scaled output is still clamped to DSHOT_MIN_THROTTLE, so it can never reach the DSHOT command range below 48. Fixes iNavFlight#9634
Raffi1202
marked this pull request as ready for review
September 11, 2026 15:50
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 |
PR Summary by QodoAllow DSHOT motor tests below configured idle
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
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 switch off images and animations for a plain-text comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the Outputs tab motor test, a DSHOT motor does not spin when its slider is set below "Motors IDLE power" but above the point where the motor would normally start (reporter's example: idle 15 %, slider 10 %). With MULTISHOT the same slider position spins the motor; only DSHOT is affected. Reported in #9634 on a SpeedyBee F405 V3 running INAV 7.0.0.
Cause
src/main/flight/mixer.c:551(maintenance-10.x): for non-reversible DSHOT,writeMotors()passesthrottleIdleValueas the stop threshold tohandleOutputScaling(), which sendsDSHOT_DISARM_COMMANDfor any input below that threshold (mixer.c:426). While disarmed,motor[i]ismotor_disarmed[i](mixer.c:652), written directly byMSP_SET_MOTOR(src/main/fc/fc_msp.c:2522). The analog non-reversible branch forwardsmotor[i]unchanged (mixer.c:589), so only DSHOT turns a below-idle test value into a stop command.Change
One line in
writeMotors(): the DSHOT stop threshold isthrottleIdleValueonly while armed; while disarmed it ismotorZeroCommand + 1, so a disarmed value abovemincommandis scaled to a DSHOT throttle.handleOutputScaling()still clamps the result toDSHOT_MIN_THROTTLE..DSHOT_MAX_THROTTLE, so the DSHOT command range 1-47 cannot be produced, andmotorZeroCommandstill yields the stop command. Armed behaviour (failsafe, turtle mode, motor stop) is unchanged.Test
Not run on hardware or SITL (
writeMotors()is compiled out for SITL). Cause verified by readingmixer.c:426/551/589/652andfc_msp.c:2522on maintenance-10.x. Not built: there is no fork CI run forfix/motor-test-below-idle, and the upstream firmware build for 3ee1df0 (https://github.com/iNavFlight/inav/actions/runs/34513097267) is waiting for maintainer approval with 0 jobs. Qodo review of 3ee1df0 reported no issues.Flash / RAM
Not measured yet. The upstream firmware CI has not been released for this PR, so no size report exists.
Docs
No documentation change needed:
docs/Controls.mdanddocs/Settings.mddescribethrottle_idleas the minimum throttle while armed, which is unchanged; no firmware doc describes the disarmed motor-test output.