TalonFXControls

class TalonFXControls(val positionVoltage: PositionVoltage = PositionVoltage(0.0), val velocityVoltage: VelocityVoltage = VelocityVoltage(0.0)) : MotorControls<TalonFX>

Control implementations for TalonFX motors.

Provides control lambdas for PWM, voltage, position, and velocity control modes.

Constructors

Link copied to clipboard
constructor(positionVoltage: PositionVoltage = PositionVoltage(0.0), velocityVoltage: VelocityVoltage = VelocityVoltage(0.0))

Properties

Link copied to clipboard
open override val positionControl: (TalonFX, Double) -> Unit

Lambda for position control. Sets the position of the TalonFX motor to the specified value.

Link copied to clipboard
val positionVoltage: PositionVoltage

Pre-allocated PositionVoltage control object for position control mode.

Link copied to clipboard
open override val pwmControl: (TalonFX, Double) -> Unit

Lambda for PWM control. Sets the output of the TalonFX motor to the specified value.

Link copied to clipboard
open override val stop: (TalonFX) -> Unit

Lambda to stop the TalonFX motor.

Link copied to clipboard
open override val velocityControl: (TalonFX, Double) -> Unit

Lambda for velocity control. Sets the velocity of the TalonFX motor to the specified value.

Link copied to clipboard
val velocityVoltage: VelocityVoltage

Pre-allocated VelocityVoltage control object for velocity control mode.

Link copied to clipboard
open override val voltageControl: (TalonFX, Double) -> Unit

Lambda for voltage control. Sets the voltage of the TalonFX motor to the specified value.