NextCRServo
Lightweight wrapper around a CRServoImplEx that provides a more user-friendly interface for controlling continuous-rotation servo power and direction.
Example:
val crServo = NextCRServo("intakeServo")
crServo.power = 0.75
crServo.direction = DcMotorSimple.Direction.REVERSEContent copied to clipboard
Parameters
initializer
A function returning the backing CRServoImplEx. It will be invoked lazily the first time the servo is accessed.
cacheTolerance
Tolerance used by the Caching delegate for power updates; defaults to 0.01.
Inheritors
Constructors
Properties
Link copied to clipboard
Link copied to clipboard
Direction of the servo. Setting this to DcMotorSimple.Direction.REVERSE causes positive power values to spin the servo the opposite way, and vice versa.
Functions
Link copied to clipboard
Sets the servo's direction to DcMotorSimple.Direction.REVERSE, causing positive power values to spin the servo the opposite way.