MotorControls

interface MotorControls<T : Any>

Interface defining control functions for a motor type.

This interface encapsulates all control lambdas for a specific motor type, separating control logic from configuration logic for better readability.

Parameters

T

The type of motor being controlled.

Inheritors

Properties

Link copied to clipboard
abstract val positionControl: (T, Double) -> Unit?

Lambda function for controlling the motor using a position value.

Link copied to clipboard
abstract val pwmControl: (T, Double) -> Unit?

Lambda function for controlling the motor using PWM (Pulse Width Modulation).

Link copied to clipboard
abstract val stop: (T) -> Unit

Lambda function to stop the motor.

Link copied to clipboard
abstract val velocityControl: (T, Double) -> Unit?

Lambda function for controlling the motor using a velocity value.

Link copied to clipboard
abstract val voltageControl: (T, Double) -> Unit?

Lambda function for controlling the motor using voltage.