NextMotor
constructor(initializer: () -> DcMotorImplEx, distancePerCount: Distance = 1.0.inches, cacheTolerance: Double = 0.01)
Parameters
initializer
A function that returns the backing DcMotorImplEx. Invoked lazily.
distancePerCount
Conversion factor from encoder counts to distance. Defaults to 1.0 inch.
cacheTolerance
Power caching tolerance to reduce redundant hardware writes. Defaults to 0.01.
constructor(module: LynxModule, port: Int, distancePerCount: Distance = 1.0.inches, 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).
distancePerCount
Encoder count to distance 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.
distancePerCount
Encoder count to distance conversion factor.
cacheTolerance
Power caching tolerance.