Package trclib.subsystem
Class TrcMotorGrabber.Params
java.lang.Object
trclib.subsystem.TrcMotorGrabber.Params
- Enclosing class:
- TrcMotorGrabber
This class contains all the parameters for the motor grabber.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
private double
private TrcMotor
private double
private TrcTrigger
private boolean
private Double
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method sets the motor object for the grabber.setPowerParams
(double intakePower, double ejectPower, double retainPower) This method sets all the different power level for the operation.setSensorTrigger
(TrcTrigger trigger, boolean inverted, Double triggerThreshold) This method sets the sensor trigger object with optional trigger callback.toString()
This method returns the string form of all the parameters.
-
Field Details
-
motor
-
sensorTrigger
-
triggerInverted
private boolean triggerInverted -
triggerThreshold
-
intakePower
private double intakePower -
ejectPower
private double ejectPower -
retainPower
private double retainPower
-
-
Constructor Details
-
Params
public Params()
-
-
Method Details
-
toString
This method returns the string form of all the parameters. -
setMotor
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.
-