Package ftclib.sensor
Class FtcAnalogInput
java.lang.Object
trclib.sensor.TrcSensor<TrcAnalogInput.DataType>
trclib.sensor.TrcAnalogInput
ftclib.sensor.FtcAnalogInput
This class implements a platform dependent AnalogInput sensor extending TrcAnalogInput. It provides implementation
of the abstract methods in TrcAnalogInput.
-
Nested Class Summary
Nested classes/interfaces inherited from class trclib.sensor.TrcAnalogInput
TrcAnalogInput.DataType
Nested classes/interfaces inherited from class trclib.sensor.TrcSensor
TrcSensor.DataSource<D>, TrcSensor.SensorData<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.qualcomm.robotcore.hardware.AnalogInput
Fields inherited from class trclib.sensor.TrcAnalogInput
ANALOGINPUT_DOUBLE_INTEGRATE, ANALOGINPUT_INTEGRATE, getInputElapsedTimer
-
Constructor Summary
ConstructorsConstructorDescriptionFtcAnalogInput
(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String instanceName, TrcFilter[] filters) Constructor: Creates an instance of the object.FtcAnalogInput
(String instanceName) Constructor: Creates an instance of the object.FtcAnalogInput
(String instanceName, TrcFilter[] filters) Constructor: Creates an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method calibrates the sensor.getRawData
(int index, TrcAnalogInput.DataType dataType) This method returns the raw sensor data of the specified type.Methods inherited from class trclib.sensor.TrcAnalogInput
getData, getDoubleIntegratedData, getIntegratedData, getNormalizedData, printElapsedTime, resetIntegrator, setElapsedTimerEnabled, setEnabled, setInverted, setScale, setScaleAndOffset, toString
Methods inherited from class trclib.sensor.TrcSensor
calibrate, calibrate, getNumAxes, getProcessedData, isCalibrating, setInverted, setScale, setScaleAndOffset
-
Field Details
-
sensor
private final com.qualcomm.robotcore.hardware.AnalogInput sensor
-
-
Constructor Details
-
FtcAnalogInput
public FtcAnalogInput(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String instanceName, TrcFilter[] filters) Constructor: Creates an instance of the object.- Parameters:
hardwareMap
- specifies the global hardware map.instanceName
- specifies the instance name.filters
- specifies an array of filter objects, one for each axis, to filter sensor data. If no filter is used, this can be set to null.
-
FtcAnalogInput
Constructor: Creates an instance of the object.- Parameters:
instanceName
- specifies the instance name.filters
- specifies an array of filter objects, one for each axis, to filter sensor data. If no filter is used, this can be set to null.
-
FtcAnalogInput
Constructor: Creates an instance of the object.- Parameters:
instanceName
- specifies the instance name.
-
-
Method Details
-
calibrate
public void calibrate()This method calibrates the sensor. -
getRawData
This method returns the raw sensor data of the specified type.- Specified by:
getRawData
in classTrcAnalogInput
- Parameters:
index
- specifies the data index (not used).dataType
- specifies the data type.- Returns:
- raw sensor data of the specified type.
-