-
Notifications
You must be signed in to change notification settings - Fork 246
Add direct heading control on swerve input stream #335
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.