Class FtcIntake

java.lang.Object
ftclib.subsystem.FtcIntake

public class FtcIntake extends Object
This class implements a platform dependent Intake Subsystem. An Intake consists of a DC motor or a continuous rotation servo. Optionally, it may have entry and exit sensors to detect the game element entering or exiting the Intake and allows callback actions such as stopping the Intake motor.
  • Field Details

  • Constructor Details

    • FtcIntake

      public FtcIntake(String instanceName, FtcIntake.Params params)
      Constructor: Create an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
      params - specifies the parameters to set up the actuator.
  • Method Details

    • getIntake

      public TrcIntake getIntake()
      This method returns the intake object.
      Returns:
      intake object.
    • createTriggerParams

      private TrcIntake.TriggerParams createTriggerParams(String name, FtcSensorTrigger.SensorType sensorType, TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback)
      This method creates the trigger parameters for the Intake sensor.
      Parameters:
      name - specifies name of the sensor.
      sensorType - specifies the sensor type.
      analogSensorData - specifies the method to call to get analog sensor data (only for SensorType AnalogSensor).
      sensorInverted - specifies true if the sensor polarity is inverted, false otherwise.
      sensorThreshold - specifies the sensor threshold value if it is an analog sensor, ignored if sensor is digital.
      triggerCallback - specifies the callback when trigger event occurred, null if not provided.
      Returns:
      created trigger parameters, null if there is no sensor.