NextColorDistanceSensor

constructor(colorInitializer: () -> NormalizedColorSensor, distanceInitializer: () -> DistanceSensor? = null)

Parameters

colorInitializer

Lazily resolves the backing NormalizedColorSensor.

distanceInitializer

Optional lazy distance sensor.


constructor(sensorName: String, hasDistance: Boolean = false)

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(module: NextLynxModule, bus: Int, hasDistance: Boolean = false)

Constructor to create a NextColorDistanceSensor using a LynxModule and I2C bus number.

Parameters

bus

The I2C bus number (in the range 0, 3)

hasDistance

Whether to also resolve a DistanceSensor from the same device. Defaults to false.