-
Notifications
You must be signed in to change notification settings - Fork 0
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
Swerve actually works this time #2
Conversation
double rotPercent = rotLimiter.calculate(-controller.getRightX()); | ||
|
||
// Apply deadband | ||
double linearMagnitude = MathUtil.applyDeadband(Math.hypot(xPercent, yPercent), 0.1); |
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.
might want to lower deadzone based on our controllers
this.cancoder.getConfigurator().apply(canCoderConfig); | ||
|
||
this.cancoderOffset = Rotation2d.fromDegrees(corner.offset); |
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.
We might also want to offset the offsets by the corner rotations in the cancoder config directly instead of handling it elsewhere in the drive code. Would make self-tests in Tuner X a little nicer, and consolidate the offset logic, but it's not problematic as it is.
Should close CLICKUP-86a1tc3y0 |
(probably)