NextColorDistanceSensor
constructor(colorInitializer: () -> NormalizedColorSensor, distanceInitializer: () -> DistanceSensor? = null)
Parameters
colorInitializer
Lazily resolves the backing NormalizedColorSensor.
distanceInitializer
Optional lazy distance sensor.
Constructor to create a NextColorDistanceSensor using a configuration name.
Parameters
sensorName
The configuration name for the sensor, usually found on the Driver Station.
hasDistance
Whether to also resolve a DistanceSensor from the same device. Defaults to false.
Constructor to create a NextColorDistanceSensor using a LynxModule and I2C bus number.
Parameters
module
The Lynx Module, see RobotController.controlHub, RobotController.expansionHub, and RobotController.servoHubs
bus
The I2C bus number (in the range 0, 3)
hasDistance
Whether to also resolve a DistanceSensor from the same device. Defaults to false.