NextDigitalSensor

constructor(initializer: () -> DigitalChannel, inverted: Boolean = true)

Parameters

initializer

Lazily resolves the backing DigitalChannel.

inverted

If true, isTriggered returns the opposite of the raw sensor state — i.e. triggered when the channel reads low. For example, a touch sensor reads false while it's being pressed, so inverting makes isTriggered read true when pressed, which is what you'd expect. Defaults to true, matching most FTC digital sensors, which are active-low.


constructor(name: String, inverted: Boolean = true)

Parameters

name

Hardware map name to resolve the DigitalChannel from.

inverted

If true, isTriggered is the opposite of the raw state. Defaults to true.