Class FrcServoGrabber.Params

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

public static class FrcServoGrabber.Params extends Object
This class contains all the parameters of the Servo Grabber.
  • 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.
    • setPrimaryServo

      public FrcServoGrabber.Params setPrimaryServo(String name, int channel, boolean inverted)
      This methods sets the parameters of the primary servo.
      Parameters:
      name - specifies the name of the servo.
      channel - specifies the PWM channel for the servo.
      inverted - specifies true if the servo is inverted, false otherwise.
      Returns:
      this object for chaining.
    • setFollowerServo

      public FrcServoGrabber.Params setFollowerServo(String name, int channel, boolean inverted)
      This methods sets the parameter of the follower servo if there is one.
      Parameters:
      name - specifies the name of the servo.
      channel - specifies the PWM channel for the servo.
      inverted - specifies true if the servo is inverted, false otherwise.
      Returns:
      this object for chaining.
    • setOpenCloseParams

      public FrcServoGrabber.Params setOpenCloseParams(double openPos, double openTime, double closePos, double closeTime)
      This method sets the open/close parameters of the servo grabber.
      Parameters:
      openPos - specifies the open position in physical unit.
      openTime - specifies the time in seconds required to open from fully close position.
      closePos - specifies the close position in physical unit.
      closeTime - specifies the time in seconds required to close from fully open position.
      Returns:
      this parameter object.
    • setDigitalInputTrigger

      public FrcServoGrabber.Params setDigitalInputTrigger(int sensorChannel, boolean triggerInverted)
      This method specifies the digital input trigger parameters.
      Parameters:
      sensorChannel - specifies the digital input channel number the sensor is plugged into.
      triggerInverted - specifies true if the trigger polarity is inverted.
      Returns:
      this object for chaining.
    • setAnalogInputTrigger

      public FrcServoGrabber.Params setAnalogInputTrigger(int sensorChannel, boolean triggerInverted, double triggerThreshold)
      This method specifies the analog input trigger parameters.
      Parameters:
      sensorChannel - specifies the digital input channel number the sensor is plugged into.
      triggerInverted - specifies true if the trigger polarity is inverted.
      triggerThreshold - specifies the trigger threshold value.
      Returns:
      this object for chaining.
    • setAnalogSensorTrigger

      public FrcServoGrabber.Params setAnalogSensorTrigger(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean triggerInverted, double triggerThreshold)
      This method specifies the analog sensor trigger parameters.
      Parameters:
      analogSensorData - 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.