Class FtcMotorGrabber.Params

java.lang.Object
ftclib.subsystem.FtcMotorGrabber.Params
Enclosing class:
FtcMotorGrabber

public static class FtcMotorGrabber.Params extends Object
This class contains all the parameters of the Motor Grabber.
  • Field Details

  • Constructor Details

    • Params

      public Params()
  • Method Details

    • toString

      @NonNull 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 FtcMotorGrabber.Params setPrimaryMotor(String name, FtcMotorActuator.MotorType motorType, boolean inverted)
      This methods sets the parameters of the primary motor.
      Parameters:
      name - specifies the name of the motor.
      motorType - specifies the type of the motor.
      inverted - specifies true if the motor is inverted, false otherwise.
      Returns:
      this object for chaining.
    • setFollowerMotor

      public FtcMotorGrabber.Params setFollowerMotor(String name, FtcMotorActuator.MotorType motorType, boolean inverted)
      This methods sets the parameter of the follower motor if there is one.
      Parameters:
      name - specifies the name of the motor.
      motorType - specifies the type of the motor.
      inverted - specifies true if the motor is inverted, false otherwise.
      Returns:
      this object for chaining.
    • setPowerParams

      public FtcMotorGrabber.Params setPowerParams(double intakePower, double ejectPower, double retainPower)
      This method sets all the different power level for the operation.
      Parameters:
      intakePower - specifies the power level for intaking the object.
      ejectPower - specifies the power level for ejecting the object.
      retainPower - specifies the power level for retaining the object.
      Returns:
      this parameter object.
    • setDigitalInputTrigger

      public FtcMotorGrabber.Params setDigitalInputTrigger(String name, boolean triggerInverted)
      This method specifies the digital input trigger parameters.
      Parameters:
      name - specifies the name of the sensor.
      triggerInverted - specifies true if the trigger polarity is inverted.
      Returns:
      this object for chaining.
    • setAnalogInputTrigger

      public FtcMotorGrabber.Params setAnalogInputTrigger(String name, boolean triggerInverted, double triggerThreshold, double hasObjectThreshold)
      This method specifies the analog input trigger parameters.
      Parameters:
      name - specifies the name of the sensor.
      triggerInverted - specifies true if the trigger polarity is inverted.
      triggerThreshold - specifies the trigger threshold value.
      hasObjectThreshold - specifies the threshold value to detect object possession.
      Returns:
      this object for chaining.
    • setAnalogSensorTrigger

      public FtcMotorGrabber.Params setAnalogSensorTrigger(TrcAnalogSensor.AnalogDataSource analogSensorSource, boolean triggerInverted, double triggerThreshold)
      This method specifies the analog sensor trigger parameters.
      Parameters:
      analogSensorSource - specifies the method to call to get the analog sensor data.
      triggerInverted - specifies true if the trigger polarity is inverted.
      triggerThreshold - specifies the trigger threshold value.
      Returns:
      this object for chaining.