Package ftclib.subsystem
Class FtcServoGrabber.Params
java.lang.Object
ftclib.subsystem.FtcServoGrabber.Params
- Enclosing class:
- FtcServoGrabber
This class contains all the parameters of the Servo Grabber.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TrcAnalogSensor.AnalogDataSource
private double
private double
private double
private double
private String
private FtcSensorTrigger.SensorType
private FtcServoActuator.Params
private boolean
private Double
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetAnalogInputTrigger
(String name, 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
(String name, boolean triggerInverted) This method specifies the digital input trigger parameters.setFollowerServo
(String name, 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, boolean inverted) This methods sets the parameters of the primary servo.toString()
This method returns the string format of the Params info.
-
Field Details
-
servoParams
-
openPos
private double openPos -
openTime
private double openTime -
closePos
private double closePos -
closeTime
private double closeTime -
sensorType
-
sensorName
-
analogSensorData
-
triggerInverted
private boolean triggerInverted -
triggerThreshold
-
-
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.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.inverted
- specifies true if the servo is inverted, false otherwise.- Returns:
- this object for chaining.
-
setOpenCloseParams
public FtcServoGrabber.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:
name
- specifies the name of the sensor.triggerInverted
- specifies true if the trigger polarity is inverted.- Returns:
- this object for chaining.
-
setAnalogInputTrigger
public FtcServoGrabber.Params setAnalogInputTrigger(String name, boolean triggerInverted, double triggerThreshold) 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.- Returns:
- this object for chaining.
-
setAnalogSensorTrigger
public FtcServoGrabber.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.
-