Package frclib.sensor

Class FrcSensorTrigger

java.lang.Object
frclib.sensor.FrcSensorTrigger

public class FrcSensorTrigger extends Object
This class creates an FRC platform specific Sensor Trigger with the specified parameters.
  • Constructor Details

    • FrcSensorTrigger

      public FrcSensorTrigger(String instanceName, FrcSensorTrigger.SensorType sensorType, int sensorChannel, TrcAnalogSensor.AnalogDataSource analogSource, boolean sensorInverted, Double triggerThreshold)
      Constructor: Creates an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
      sensorType - specifies the sensor type.
      sensorChannel - specifies the channel number the sensor is plugged into (analog or digital input).
      analogSource - specifies the analog sensor source, only applicable if the sensor type is AnalogSource.
      sensorInverted - specifies true if the sensor polarity is inverted.
      triggerThreshold - specifies the trigger threshold value if it is an analog sensor, null if sensor is digital.
  • Method Details

    • toString

      public String toString()
      This method returns the instance name.
      Overrides:
      toString in class Object
      Returns:
      instance name.
    • getTrigger

      public TrcTrigger getTrigger()
      This method returns the created sensor trigger.
      Returns:
      sensor trigger.