ControlType

sealed class ControlType

Motor control mode.

Determines how the motor interprets and uses the power value.

Inheritors

Types

Link copied to clipboard
data class AbsolutePosition(val setpoint: Angle) : NextMotor.ControlType

Continuous closed-loop absolute position tracking using PID and feedforward. Takes the shortest path to the angle regardless of current rotations.

Link copied to clipboard
data class Follow(val motor: NextMotor, val direction: NextMotor.Direction) : NextMotor.ControlType

Follows another motor's behavior.

Link copied to clipboard
data class Position(val setpoint: Angle) : NextMotor.ControlType

Closed-loop position tracking using PID and feedforward.

Link copied to clipboard
data class Throttle(val throttle: Double) : NextMotor.ControlType

Direct power/duty cycle control. Power is applied as-is.

Link copied to clipboard
data class Velocity(val setpoint: AngularVelocity) : NextMotor.ControlType

Closed-loop velocity tracking using PID and feedforward.

Link copied to clipboard
data class Voltage(val voltage: Voltage) : NextMotor.ControlType

Voltage-based control. Power is adjusted to account for rail voltage.