wpimath functions

wpimath.angleModulus(angle: radians) radians
wpimath.applyDeadband(value: float, deadband: float, maxMagnitude: float = 1.0) float

Returns 0.0 if the given value is within the specified range around zero. The remaining range between the deadband and the maximum magnitude is scaled from 0.0 to the maximum magnitude.

Parameters:
  • value – Value to clip.

  • deadband – Range around zero.

  • maxMagnitude – The maximum magnitude of the input (defaults to 1). Can be infinite.

Returns:

The value after the deadband is applied.