NextMotor
constructor(initializer: () -> DcMotorImplEx, anglePerCount: Angle = 1.0.radians, cacheTolerance: Double = 0.01)
Parameters
initializer
A function that returns the backing DcMotorImplEx. Invoked lazily.
anglePerCount
Conversion factor from encoder counts to angle. Defaults to 1.0 radian.
cacheTolerance
Power caching tolerance to reduce redundant hardware writes. Defaults to 0.01.
constructor(module: NextLynxModule, port: Int, anglePerCount: Angle = 1.0.radians, cacheTolerance: Double = 0.01)
Constructs a motor from a Lynx hub module and port number.
Wraps the port within the given module's motor controller.
Parameters
module
The Lynx module housing this motor port.
port
The motor port on the module (0-based).
anglePerCount
Encoder count to angle conversion factor.
cacheTolerance
Power caching tolerance.
Constructs a motor by name from the current hardware map.
Looks up the motor in RobotController.hardwareMap.
Parameters
name
Hardware map device name.
anglePerCount
Encoder count to angle conversion factor.
cacheTolerance
Power caching tolerance.