MonguConfig

interface MonguConfig<T : Any>

Interface for motor configuration that includes control mappings.

This interface defines configuration application and provides access to motor controls. Control logic is delegated to a MotorControls instance for better separation of concerns.

Parameters

T

The type of the motor or device being controlled.

Inheritors

Properties

Link copied to clipboard
abstract val controls: MotorControls<T>

The motor controls instance containing all control lambdas.

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

Lambda function for controlling the motor using a position value.

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

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

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

Lambda function to stop the motor.

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

Lambda function for controlling the motor using a velocity value.

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

Lambda function for controlling the motor using voltage.

Functions

Link copied to clipboard
abstract fun applyTo(motor: T)

Applies the configuration to the given motor.