TonguFX

constructor(deviceId: Int, controlRequest: T, withOutput: T.(Double) -> T, canbus: CANBus = CANBus.roboRIO(), monguConfig: TalonFXConfig.() -> Unit = {})

Creates a TonguFX motor controller.

Parameters

deviceId

The CAN device id for the TalonFX.

controlRequest

A template control request instance used as the base for control operations.

withOutput

An extension function on the control request type that returns a new request with the given output value.

canbus

The CAN bus to use (default is roboRIO).

monguConfig

Optional DSL block to configure the motor's TalonFXConfig during initialization.