Package ftclib.subsystem
Class FtcIntake.Params
java.lang.Object
ftclib.subsystem.FtcIntake.Params
- Enclosing class:
- FtcIntake
This class contains all the parameters of the Intake.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TrcAnalogSensor.AnalogDataSource
private boolean
private String
private double
private FtcSensorTrigger.SensorType
private TrcEvent.Callback
private TrcAnalogSensor.AnalogDataSource
private boolean
private String
private double
private FtcSensorTrigger.SensorType
private TrcEvent.Callback
private FtcMotorActuator.Params
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetEntryAnalogInput
(String name, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog input sensor parameters.setEntryAnalogSensor
(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog sensor parameters.setEntryDigitalInput
(String name, boolean inverted, TrcEvent.Callback triggerCallback) This method specifies the entry digital input sensor parameters.setExitAnalogInput
(String name, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog input sensor parameters.setExitAnalogSensor
(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog sensor parameters.setExitDigitalInput
(String name, boolean inverted, TrcEvent.Callback triggerCallback) This method specifies the exit digital input sensor parameters.setFollowerMotor
(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This method sets the parameters of the follower motor.setPrimaryMotor
(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This method sets the parameters of the primary motor.toString()
This method returns the string format of the Params info.
-
Field Details
-
motorParams
-
entrySensorType
-
entrySensorName
-
entryAnalogSensorData
-
entrySensorInverted
private boolean entrySensorInverted -
entrySensorThreshold
private double entrySensorThreshold -
entryTriggerCallback
-
exitSensorType
-
exitSensorName
-
exitAnalogSensorData
-
exitSensorInverted
private boolean exitSensorInverted -
exitSensorThreshold
private double exitSensorThreshold -
exitTriggerCallback
-
-
Constructor Details
-
Params
public Params()
-
-
Method Details
-
toString
This method returns the string format of the Params info. -
setPrimaryMotor
public FtcIntake.Params setPrimaryMotor(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This method sets the parameters of the primary motor.- Parameters:
name
- specifies the name of the motor.motorType
- specifies the motor type.inverted
- specifies true to invert the motor direction, false otherwise.- Returns:
- this object for chaining.
-
setFollowerMotor
public FtcIntake.Params setFollowerMotor(String name, FtcMotorActuator.MotorType motorType, boolean inverted) This method sets the parameters of the follower motor.- Parameters:
name
- specifies the name of the motor.motorType
- specifies the motor type.inverted
- specifies true to invert the motor direction, false otherwise.- Returns:
- this object for chaining.
-
setEntryDigitalInput
public FtcIntake.Params setEntryDigitalInput(String name, boolean inverted, TrcEvent.Callback triggerCallback) This method specifies the entry digital input sensor parameters.- Parameters:
name
- specifies the name of the sensor.inverted
- specifies true if the sensor polarity is inverted, false otherwise.triggerCallback
- specifies the callback method when trigger event occurred, null if not provided.- Returns:
- this object for chaining.
-
setEntryAnalogInput
public FtcIntake.Params setEntryAnalogInput(String name, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog input sensor parameters.- Parameters:
name
- specifies the name of the sensor.inverted
- specifies true if the sensor polarity is inverted, false otherwise.threshold
- specifies the sensor threshold value.triggerCallback
- specifies the callback method when trigger event occurred, null if not provided.- Returns:
- this object for chaining.
-
setEntryAnalogSensor
public FtcIntake.Params setEntryAnalogSensor(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog sensor parameters.- Parameters:
analogSensorData
- specifies the method to call to get the analog sensor data.inverted
- specifies true if the sensor polarity is inverted, false otherwise.threshold
- specifies the sensor threshold value.triggerCallback
- specifies the callback method when trigger event occurred, null if not provided.- Returns:
- this object for chaining.
-
setExitDigitalInput
public FtcIntake.Params setExitDigitalInput(String name, boolean inverted, TrcEvent.Callback triggerCallback) This method specifies the exit digital input sensor parameters.- Parameters:
name
- specifies the name of the sensor.inverted
- specifies true if the sensor polarity is inverted, false otherwise.triggerCallback
- specifies the callback method when trigger event occurred, null if not provided.- Returns:
- this object for chaining.
-
setExitAnalogInput
public FtcIntake.Params setExitAnalogInput(String name, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog input sensor parameters.- Parameters:
name
- specifies the name of the sensor.inverted
- specifies true if the sensor polarity is inverted, false otherwise.threshold
- specifies the sensor threshold value.triggerCallback
- specifies the callback method when trigger event occurred, null if not provided.- Returns:
- this object for chaining.
-
setExitAnalogSensor
public FtcIntake.Params setExitAnalogSensor(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean inverted, double threshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog sensor parameters.- Parameters:
analogSensorData
- specifies the method to call to get the analog sensor data.inverted
- specifies true if the sensor polarity is inverted, false otherwise.threshold
- specifies the sensor threshold value.triggerCallback
- specifies the callback method when trigger event occurred, null if not provided.- Returns:
- this object for chaining.
-