Skip to content

Commit

Permalink
Merge pull request #121 from BrysonSmith15/swerve_example_position
Browse files Browse the repository at this point in the history
Changed the swervemodule getPosition function to use encoder distance
  • Loading branch information
virtuald authored Dec 4, 2024
2 parents 4ca730a + cc72334 commit 4b55fef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SwerveBot/swervemodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def getPosition(self) -> wpimath.kinematics.SwerveModulePosition:
:returns: The current position of the module.
"""
return wpimath.kinematics.SwerveModulePosition(
self.driveEncoder.getRate(),
self.driveEncoder.getDistance(),
wpimath.geometry.Rotation2d(self.turningEncoder.getDistance()),
)

Expand Down

0 comments on commit 4b55fef

Please sign in to comment.