-
Notifications
You must be signed in to change notification settings - Fork 0
init commit #1
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: main
Are you sure you want to change the base?
init commit #1
Conversation
Ayidana-Aboraah
left a comment
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.
Mostly formatting changes and important configuration changes.
| steerencoder.configMagnetOffset(encoderoffset); | ||
| steerencoder.configAbsoluteSensorRange(AbsoluteSensorRange.Unsigned_0_to_360); |
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 configure statusFramePeriod and add timeouts. Sensor direction may also be a setting you want to configure.
| swervemotor.getEncoder().setPosition(0); | ||
| } | ||
|
|
||
| public void rotateto(double rotation){ |
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.
camelCase should be used.
| swervemotor.getEncoder().setPosition(Math.toRadians(steerencoder.getAbsolutePosition())); | ||
| } | ||
|
|
||
| public void move(double setSwerveMotorPosition, double drivemotorspeed){ |
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.
M should be captial
| steerencoder.configAbsoluteSensorRange(AbsoluteSensorRange.Unsigned_0_to_360); | ||
| } | ||
|
|
||
| public void resetSteerPosition() { |
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.
R should be capital
Swerve drive code integrated with joystick.