Class DigitalInputDevice
java.lang.Object
com.cdarobotics.cdalib.devices.Device
com.cdarobotics.cdalib.devices.sensors.DigitalInputDevice
-
Constructor Summary
ConstructorsConstructorDescriptionDigitalInputDevice(com.qualcomm.robotcore.hardware.DigitalChannel channel) Wraps an already-resolved digital channel and puts it in input mode.DigitalInputDevice(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String name) Resolves the digital channel from the hardware map by configured name. -
Method Summary
-
Constructor Details
-
DigitalInputDevice
public DigitalInputDevice(com.qualcomm.robotcore.hardware.DigitalChannel channel) Wraps an already-resolved digital channel and puts it in input mode. -
DigitalInputDevice
Resolves the digital channel from the hardware map by configured name.
-
-
Method Details
-
getState
public boolean getState()- Returns:
- the channel state as of the last
update().
-
getChannel
public com.qualcomm.robotcore.hardware.DigitalChannel getChannel()- Returns:
- the wrapped SDK channel, for operations not exposed here.
-
update
public void update()Description copied from class:DeviceFlush pending writes to, or refresh cached reads from, the underlying hardware.
-