Package ftclib.archive
Class FtcMRColorSensor
This class implements the Modern Color sensor extending TrcAnalogInput. It provides implementation of the abstract
methods in TrcAnalogInput.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class trclib.sensor.TrcSensor
TrcSensor.DataSource<D>, TrcSensor.SensorData<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.qualcomm.hardware.modernrobotics.ModernRoboticsI2cColorSensor
Fields inherited from class trclib.sensor.TrcSensor
instanceName, tracer
-
Constructor Summary
ConstructorsConstructorDescriptionFtcMRColorSensor
(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String instanceName) Constructor: Creates an instance of the object.FtcMRColorSensor
(String instanceName) Constructor: Creates an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptiongetRawData
(int index, FtcMRColorSensor.DataType dataType) This method returns the raw sensor data of the specified type.Methods inherited from class trclib.sensor.TrcSensor
calibrate, calibrate, getNumAxes, getProcessedData, isCalibrating, setInverted, setScale, setScaleAndOffset, toString
-
Field Details
-
sensor
public com.qualcomm.hardware.modernrobotics.ModernRoboticsI2cColorSensor sensor
-
-
Constructor Details
-
FtcMRColorSensor
public FtcMRColorSensor(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.
-
FtcMRColorSensor
Constructor: Creates an instance of the object.- Parameters:
instanceName
- specifies the instance name.
-
-
Method Details
-
getRawData
This method returns the raw sensor data of the specified type.- Specified by:
getRawData
in classTrcSensor<FtcMRColorSensor.DataType>
- Parameters:
index
- specifies the data index.dataType
- specifies the data type.- Returns:
- raw sensor data of the specified index and type.
-