configureSwerve

fun configureSwerve(offset: Rotation2d = Rotation2d(), clockwisePositive: Boolean = false)

Configures the encoder for swerve module use with common settings.

Applies standard configuration for swerve modules including:

  • Counter-clockwise positive direction

  • Provided magnet offset

Example:

val encoder = Engu(1)
encoder.configureSwerve(Rotation2d.fromDegrees(45.0))

Parameters

offset

The magnet offset as a Rotation2d.

clockwisePositive

Whether clockwise should be positive (default: false).