Allow motor test mode when reversible motors (3D) enabled#2595
Open
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
Open
Allow motor test mode when reversible motors (3D) enabled#2595sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
Conversation
feature3DSupported was always false and never set to true, preventing motor testing for users with reversible ESCs. Remove the dead variable and let 3D motor testing work. Also fix typo FC.EVERSIBLE_MOTORS that would have caused a runtime error on the neutral sanity check.
|
|
tested on a speedybee f7 v3 fc and motor testing now works when reversible motor is on, but only forwards. |
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.



Needs firmware support for reverse to work
Summary
Fixes the Outputs tab motor test checkbox being disabled when the REVERSIBLE_MOTORS feature (3D mode / bidirectional ESCs) is enabled.
Problem
feature3DSupportedwas initialized tofalseand never set totrueanywhere. This caused the guardif (self.feature3DEnabled && !self.feature3DSupported)to always block test mode for 3D users. The variable was a leftover from a removed API version check (commit ef831a3 from 2016).Additionally, a typo (
FC.EVERSIBLE_MOTORSinstead ofFC.REVERSIBLE_MOTORS) in the neutral value sanity check would have caused a runtime TypeError if the code path had been reachable.Changes
feature3DSupportedvariable and the guard that blocked test modefeature3DEnabled && feature3DSupportedchecks to justfeature3DEnabledFC.EVERSIBLE_MOTORS→FC.REVERSIBLE_MOTORSTesting