Skip to content

Conversation

@yajo10
Copy link
Contributor

@yajo10 yajo10 commented Jan 3, 2022

Hey,
that's my very very first PR I'm creating so I'm very pleased about any hints ;)
Using reversible ESCs required a bit of workarounds. See #5767 (comment).
Reversible motors turning into one direction started from the high speed end at the center of the stick to the low speed end at the end of the throttle stick.
This PR was tested by me with HAKRC_35A ESCs.

@yajo10 yajo10 changed the title Don't start motor with high throttle in the mid of the stick Reversible ESC's for rovers: Don't start motor with high throttle in the mid of the stick Jan 3, 2022
@JulioCesarMatias
Copy link
Collaborator

Hey, that's my very very first PR I'm creating so I'm very pleased about any hints ;) Using reversible ESCs required a bit of workarounds. See #5767 (comment). Reversible motors turning into one direction started from the high speed end at the center of the stick to the low speed end at the end of the throttle stick. This PR was tested by me with HAKRC_35A ESCs.

thanks for it!

@yajo10
Copy link
Contributor Author

yajo10 commented Jan 4, 2022

This issue should be related: #5820

motorValueWhenStopped = getReversibleMotorsThrottleDeadband();
mixerThrottleCommand = constrain(rcCommand[THROTTLE], throttleRangeMin, throttleRangeMax);

if(feature(FEATURE_REVERSIBLE_MOTORS) && reversibleMotorsThrottleState == MOTOR_DIRECTION_BACKWARD) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this applies only for DSHOT, then if DSHOT should be added to this condition. Code works fine for non-DSHOT protocols and making that change would break that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your reply and feedback! I have added the check at compile and at runtime. Is that ok for your?

@yajo10 yajo10 requested a review from DzikuVx January 19, 2022 10:14
Copy link
Member

@DzikuVx DzikuVx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small thing and seems like we are done!

@yajo10 yajo10 requested a review from DzikuVx January 19, 2022 14:46
@DzikuVx DzikuVx added this to the 5.0 milestone Jan 21, 2022
@JulioCesarMatias
Copy link
Collaborator

I don't know where I read to do the review up there. I got something wrong, sorry.

@yajo10
Copy link
Contributor Author

yajo10 commented Jan 22, 2022

I'm sorry. I requested for the review, but I don't know who the notification about this request got. Seems DzikuVx was faster :)

@DzikuVx DzikuVx merged commit b0b00cd into iNavFlight:master Feb 13, 2022
sakisdog pushed a commit to sakisdog/inav that referenced this pull request Apr 19, 2022
…ng_speed

Reversible ESC's for rovers: Don't start motor with high throttle in the mid of the stick

(cherry picked from commit b0b00cd)
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.

3 participants