Class FrcIntake.Params

java.lang.Object
frclib.subsystem.FrcIntake.Params
Enclosing class:
FrcIntake

public static class FrcIntake.Params extends Object
This class contains all the parameters of the Intake.
  • Constructor Details

    • Params

      public Params()
  • Method Details

    • toString

      public String toString()
      This method returns the string format of the Params info.
      Overrides:
      toString in class Object
      Returns:
      string format of the params info.
    • setPrimaryMotor

      public FrcIntake.Params setPrimaryMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean brushless, boolean absEnc, boolean inverted)
      This method sets the parameters of the primary motor.
      Parameters:
      motorName - specifies the name of the motor.
      motorId - specifies the ID for the motor (CAN ID for CAN motor, PWM channel for PWM motor).
      motorType - specifies the motor type.
      brushless - specifies true if motor is brushless, false if brushed (only applicable for SparkMax).
      absEnc - specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).
      inverted - specifies true to invert the motor direction, false otherwise.
      Returns:
      this object for chaining.
    • setFollowerMotor

      public FrcIntake.Params setFollowerMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean brushless, boolean absEnc, boolean inverted)
      This method sets the parameters of the follower motor.
      Parameters:
      motorName - specifies the name of the motor.
      motorId - specifies the ID for the motor (CAN ID for CAN motor, PWM channel for PWM motor).
      motorType - specifies the motor type.
      brushless - specifies true if motor is brushless, false if brushed (only applicable for SparkMax).
      absEnc - specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).
      inverted - specifies true to invert the motor direction, false otherwise.
      Returns:
      this object for chaining.
    • setEntryDigitalInput

      public FrcIntake.Params setEntryDigitalInput(int sensorChannel, boolean sensorInverted, TrcEvent.Callback triggerCallback)
      This method specifies the entry digital input sensor parameters.
      Parameters:
      sensorChannel - specifies the digital input channel the sensor is plugged into.
      sensorInverted - specifies true if the sensor polarity is inverted, false otherwise.
      triggerCallback - specifies the callback method when trigger event occurred, null if not provided.
      Returns:
      this object for chaining.
    • setEntryAnalogInput

      public FrcIntake.Params setEntryAnalogInput(int sensorChannel, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback)
      This method specifies the entry analog input sensor parameters.
      Parameters:
      sensorChannel - specifies the analog input channel the sensor is plugged into.
      sensorInverted - specifies true if the sensor polarity is inverted, false otherwise.
      sensorThreshold - specifies the sensor threshold value.
      triggerCallback - specifies the callback method when trigger event occurred, null if not provided.
      Returns:
      this object for chaining.
    • setEntryAnalogSensor

      public FrcIntake.Params setEntryAnalogSensor(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback)
      This method specifies the entry analog sensor parameters.
      Parameters:
      analogSensorData - specifies the method to call to get the analog sensor data.
      sensorInverted - specifies true if the sensor polarity is inverted, false otherwise.
      sensorThreshold - specifies the sensor threshold value.
      triggerCallback - specifies the callback method when trigger event occurred, null if not provided.
      Returns:
      this object for chaining.
    • setExitDigitalInput

      public FrcIntake.Params setExitDigitalInput(int sensorChannel, boolean sensorInverted, TrcEvent.Callback triggerCallback)
      This method specifies the exit digital input sensor parameters.
      Parameters:
      sensorChannel - specifies the digital input channel the sensor is plugged into.
      sensorInverted - specifies true if the sensor polarity is inverted, false otherwise.
      triggerCallback - specifies the callback method when trigger event occurred, null if not provided.
      Returns:
      this object for chaining.
    • setExitAnalogInput

      public FrcIntake.Params setExitAnalogInput(int sensorChannel, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback)
      This method specifies the exit analog input sensor parameters.
      Parameters:
      sensorChannel - specifies the analog input channel the sensor is plugged into.
      sensorInverted - specifies true if the sensor polarity is inverted, false otherwise.
      sensorThreshold - specifies the sensor threshold value.
      triggerCallback - specifies the callback method when trigger event occurred, null if not provided.
      Returns:
      this object for chaining.
    • setExitAnalogSensor

      public FrcIntake.Params setExitAnalogSensor(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback)
      This method specifies the exit analog sensor parameters.
      Parameters:
      analogSensorData - specifies the method to call to get the analog sensor data.
      sensorInverted - specifies true if the sensor polarity is inverted, false otherwise.
      sensorThreshold - specifies the sensor threshold value.
      triggerCallback - specifies the callback method when trigger event occurred, null if not provided.
      Returns:
      this object for chaining.