Package ftclib.sensor
Class FtcDigitalInput
java.lang.Object
trclib.sensor.TrcDigitalInput
ftclib.sensor.FtcDigitalInput
This class implements a platform dependent digital input sensor extending TrcDigitalInput. It provides
implementation of the abstract methods in TrcDigitalInput.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.qualcomm.robotcore.hardware.DigitalChannelFields inherited from class trclib.sensor.TrcDigitalInput
getInputElapsedTimer, instanceName -
Constructor Summary
ConstructorsConstructorDescriptionFtcDigitalInput(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String instanceName) Constructor: Creates an instance of the object.FtcDigitalInput(String instanceName) Constructor: Creates an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis method returns the state of the digital input sensor.Methods inherited from class trclib.sensor.TrcDigitalInput
isActive, printElapsedTime, setElapsedTimerEnabled, setInverted, toString
-
Field Details
-
digitalInput
private final com.qualcomm.robotcore.hardware.DigitalChannel digitalInput
-
-
Constructor Details
-
FtcDigitalInput
public FtcDigitalInput(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String instanceName) Constructor: Creates an instance of the object.- Parameters:
hardwareMap- specifies the global hardware map.instanceName- specifies the instance name.
-
FtcDigitalInput
Constructor: Creates an instance of the object.- Parameters:
instanceName- specifies the instance name.
-
-
Method Details
-
getInputState
public boolean getInputState()This method returns the state of the digital input sensor.- Specified by:
getInputStatein classTrcDigitalInput- Returns:
- true if the digital input sensor is active, false otherwise.
-