Package ftclib.sensor

Class FtcOpticalDistanceSensor


public class FtcOpticalDistanceSensor extends TrcSensor<FtcOpticalDistanceSensor.DataType>
This class implements the Modern Robotics Optical Distance sensor extending TrcAnalogInput. It provides implementation of the abstract methods in TrcAnalogInput.
  • Field Details

    • sensor

      public com.qualcomm.robotcore.hardware.OpticalDistanceSensor sensor
  • Constructor Details

    • FtcOpticalDistanceSensor

      public FtcOpticalDistanceSensor(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.
    • FtcOpticalDistanceSensor

      public FtcOpticalDistanceSensor(String instanceName, TrcFilter[] filters)
      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.
    • FtcOpticalDistanceSensor

      public FtcOpticalDistanceSensor(String instanceName)
      Constructor: Creates an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
  • Method Details