swerve Encoder
fun swerveEncoder(id: Int, offset: Rotation2d = Rotation2d(), clockwisePositive: Boolean = false): Engu
Creates an Engu encoder configured for swerve module use.
Usage Example:
val encoder = swerveEncoder(
id = 1,
offset = Rotation2d.fromDegrees(45.0)
)Content copied to clipboard
Return
Configured Engu encoder.
Parameters
id
CAN ID of the CANcoder.
offset
Magnet offset for the encoder.
clockwise Positive
Whether clockwise should be positive (default: false).