Package frclib.subsystem
Class FrcServoGrabber.Params
java.lang.Object
frclib.subsystem.FrcServoGrabber.Params
- Enclosing class:
- FrcServoGrabber
This class contains all the parameters of the Servo Grabber.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetAnalogInputTrigger
(int sensorChannel, boolean triggerInverted, double triggerThreshold) This method specifies the analog input trigger parameters.setAnalogSensorTrigger
(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean triggerInverted, double triggerThreshold) This method specifies the analog sensor trigger parameters.setDigitalInputTrigger
(int sensorChannel, boolean triggerInverted) This method specifies the digital input trigger parameters.setFollowerServo
(String name, int channel, boolean inverted) This methods sets the parameter of the follower servo if there is one.setOpenCloseParams
(double openPos, double openTime, double closePos, double closeTime) This method sets the open/close parameters of the servo grabber.setPrimaryServo
(String name, int channel, boolean inverted) This methods sets the parameters of the primary servo.toString()
This method returns the string format of the Params info.
-
Constructor Details
-
Params
public Params()
-
-
Method Details
-
toString
This method returns the string format of the Params info. -
setPrimaryServo
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
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
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.
-