NextFeedbackCRServo

constructor(initializer: () -> CRServoImplEx, feedbackInitializer: () -> AnalogFeedback, cacheTolerance: Double = 0.01)

Parameters

initializer

A function returning the backing CRServoImplEx. It will be invoked lazily the first time the servo is accessed.

feedbackInitializer

A function returning the backing AnalogFeedback used to read the feedback angle. Accepts any AnalogFeedback implementation.

cacheTolerance

Tolerance for the NextCRServo power caching delegate.


constructor(servoName: String, feedback: AnalogFeedback, cacheTolerance: Double = 0.01)

Constructor to create a NextFeedbackCRServo using a servo name and an already-constructed AnalogFeedback instance for the feedback input.

Parameters

servoName

Hardware map name of the servo.

feedback

An already-constructed AnalogFeedback instance to read the angle from.

cacheTolerance

Tolerance for the NextCRServo power caching delegate.


constructor(module: NextLynxModule, port: Int, feedback: AnalogFeedback, cacheTolerance: Double = 0.01)

Constructor to create a NextFeedbackCRServo using a LynxModule and port number for the servo, and an already-constructed AnalogFeedback instance for the feedback input.

Parameters

port

The servo port (in the range 0, 5).

feedback

An already-constructed AnalogFeedback instance to read the angle from.

cacheTolerance

Tolerance for the NextCRServo power caching delegate.