Package ftclib.subsystem
Class FtcMotorGrabber.Params
java.lang.Object
ftclib.subsystem.FtcMotorGrabber.Params
- Enclosing class:
- FtcMotorGrabber
This class contains all the parameters of the Motor Grabber.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TrcAnalogSensor.AnalogDataSource
private double
private double
private FtcMotorActuator.Params
private double
private String
private FtcSensorTrigger.SensorType
private boolean
private Double
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetAnalogInputTrigger
(String name, boolean triggerInverted, double triggerThreshold, double hasObjectThreshold) This method specifies the analog input trigger parameters.setAnalogSensorTrigger
(TrcAnalogSensor.AnalogDataSource analogSensorSource, 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.setFollowerMotor
(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This methods sets the parameter of the follower motor if there is one.setPowerParams
(double intakePower, double ejectPower, double retainPower) This method sets all the different power level for the operation.setPrimaryMotor
(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This methods sets the parameters of the primary motor.toString()
This method returns the string format of the Params info.
-
Field Details
-
motorParams
-
sensorType
-
sensorName
-
analogSensorSource
-
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 format of the Params info. -
setPrimaryMotor
public FtcMotorGrabber.Params setPrimaryMotor(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This methods sets the parameters of the primary motor.- Parameters:
name
- specifies the name of the motor.motorType
- specifies the type of the motor.inverted
- specifies true if the motor is inverted, false otherwise.- Returns:
- this object for chaining.
-
setFollowerMotor
public FtcMotorGrabber.Params setFollowerMotor(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This methods sets the parameter of the follower motor if there is one.- Parameters:
name
- specifies the name of the motor.motorType
- specifies the type of the motor.inverted
- specifies true if the motor is inverted, false otherwise.- Returns:
- this object for chaining.
-
setPowerParams
public FtcMotorGrabber.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.
-
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 FtcMotorGrabber.Params setAnalogInputTrigger(String name, boolean triggerInverted, double triggerThreshold, double hasObjectThreshold) 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.hasObjectThreshold
- specifies the threshold value to detect object possession.- Returns:
- this object for chaining.
-
setAnalogSensorTrigger
public FtcMotorGrabber.Params setAnalogSensorTrigger(TrcAnalogSensor.AnalogDataSource analogSensorSource, boolean triggerInverted, double triggerThreshold) This method specifies the analog sensor trigger parameters.- Parameters:
analogSensorSource
- 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.
-