-
Notifications
You must be signed in to change notification settings - Fork 240
Add direct heading control on swerve input stream #335
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
base: dev
Are you sure you want to change the base?
Conversation
|
This should create a new HEADING drive mode. Not use the existing one. |
|
I will do it. However, if they are both heading control so why separate them into two sections if they do the same thing? |
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.
So close!
| * @param fieldRelativeRotation Field-relative {@link Rotation2d} to flip. | ||
| * @return Alliance-oriented {@link Rotation2d} | ||
| */ | ||
| private Rotation2d applyAllianceAwareRotation(Rotation2d fieldRelativeRotation) |
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.
This function was removed.
| } else if (headingEnabled.isPresent() && headingEnabled.get().getAsBoolean()) | ||
| { | ||
| if (controllerHeadingX.isPresent() && controllerHeadingY.isPresent()) | ||
| if (headingSupplier.isPresent() || (controllerHeadingX.isPresent() && controllerHeadingY.isPresent())) |
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.
heading supplier should not be used here.
| * @param fieldRelativeRotation Field-relative {@link Rotation2d} to offset | ||
| * @return Offsetted {@link Rotation2d} | ||
| */ | ||
| private Rotation2d applyHeadingOffset(Rotation2d fieldRelativeRotation) |
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.
Duplicate function
No description provided.