Skip to content

Commit 4b55fef

Browse files
authored
Merge pull request #121 from BrysonSmith15/swerve_example_position
Changed the swervemodule getPosition function to use encoder distance
2 parents 4ca730a + cc72334 commit 4b55fef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SwerveBot/swervemodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def getPosition(self) -> wpimath.kinematics.SwerveModulePosition:
9494
:returns: The current position of the module.
9595
"""
9696
return wpimath.kinematics.SwerveModulePosition(
97-
self.driveEncoder.getRate(),
97+
self.driveEncoder.getDistance(),
9898
wpimath.geometry.Rotation2d(self.turningEncoder.getDistance()),
9999
)
100100

0 commit comments

Comments
 (0)