Class TrcMotorGrabber.Params

java.lang.Object
trclib.subsystem.TrcMotorGrabber.Params
Enclosing class:
TrcMotorGrabber

public static class TrcMotorGrabber.Params extends Object
This class contains all the parameters for the motor grabber.
  • Field Details

    • motor

      private TrcMotor motor
    • sensorTrigger

      private TrcTrigger sensorTrigger
    • triggerInverted

      private boolean triggerInverted
    • triggerThreshold

      private Double triggerThreshold
    • intakePower

      private double intakePower
    • ejectPower

      private double ejectPower
    • retainPower

      private double retainPower
  • Constructor Details

    • Params

      public Params()
  • Method Details

    • toString

      public String toString()
      This method returns the string form of all the parameters.
      Overrides:
      toString in class Object
      Returns:
      string form of all the parameters.
    • setMotor

      public TrcMotorGrabber.Params setMotor(TrcMotor motor)
      This method sets the motor object for the grabber.
      Parameters:
      motor - specifies the motor object.
      Returns:
      this parameter object.
    • setSensorTrigger

      public TrcMotorGrabber.Params setSensorTrigger(TrcTrigger trigger, boolean inverted, Double triggerThreshold)
      This method sets the sensor trigger object with optional trigger callback.
      Parameters:
      trigger - specifies the sensor trigger object.
      inverted - specifies true to invert the trigger, false otherwise.
      triggerThreshold - specifies the trigger threshold value.
      Returns:
      this parameter object.
    • setPowerParams

      public TrcMotorGrabber.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.