-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flip to encoded motor structure #1552
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -174,6 +179,7 @@ type EncodedMotor struct { | |||
// .01 would ramp very slowly, 1 would ramp instantaneously | |||
rampRate float64 | |||
maxPowerPct float64 | |||
flip int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding in a comment explaining that this will be either +1 or -1, depending on dirFlip
in the config? I can argue either way. Maybe it's fine as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added!
|
@@ -174,6 +179,7 @@ type EncodedMotor struct { | |||
// .01 would ramp very slowly, 1 would ramp instantaneously | |||
rampRate float64 | |||
maxPowerPct float64 | |||
flip int64 // defaults to 1, becomes -1 if the motor config has a true DirectionFLip bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next PR: lowercase L in DirectionFlip 🙃
No description provided.