Package frclib.sensor

Class FrcAnalogInput


public class FrcAnalogInput extends TrcAnalogInput
This class implements a platform dependent AnalogInput sensor extending TrcAnalogInput. It provides implementation of the abstract methods in TrcAnalogInput.
  • Constructor Details

    • FrcAnalogInput

      public FrcAnalogInput(String instanceName, int channel, TrcFilter[] filters, boolean powerRailIs3V3)
      Constructor: Creates an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
      channel - specifies the analog input channel.
      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.
      powerRailIs3V3 - specifies true if analog power rail is 3.3V, false if 5V.
    • FrcAnalogInput

      public FrcAnalogInput(String instanceName, int channel, TrcFilter[] filters)
      Constructor: Creates an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
      channel - specifies the analog input channel.
      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.
    • FrcAnalogInput

      public FrcAnalogInput(String instanceName, int channel)
      Constructor: Creates an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
      channel - specifies the analog input channel.
  • Method Details

    • calibrate

      public void calibrate()
      This method calibrates the sensor.
    • getRawData

      public TrcSensor.SensorData<Double> getRawData(int index, TrcAnalogInput.DataType dataType)
      This method returns the raw sensor data of the specified type.
      Specified by:
      getRawData in class TrcAnalogInput
      Parameters:
      index - specifies the data index (not used).
      dataType - specifies the data type.
      Returns:
      raw sensor data of the specified type.