NextServo

constructor(initializer: () -> ServoImplEx, cacheTolerance: Double = 0.01)

Parameters

initializer

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

cacheTolerance

Tolerance used by the Caching delegate for position updates; defaults to 0.01.


constructor(module: LynxModule, port: Int, cacheTolerance: Double = 0.01)

Constructor to create a NextServo using a LynxModule and port number.

Example:

val servo = NextServo(RobotController.controlHub, 0) // Creates a NextServo on the Control Hub port 0

Parameters

port

The servo port (in the range 0, 5)

cacheTolerance

Tolerance used by the Caching delegate for position updates; defaults to 0.01.


constructor(name: String, cacheTolerance: Double = 0.01)