Package ftclib.subsystem
Class FtcIntake
java.lang.Object
ftclib.subsystem.FtcIntake
This class implements a platform dependent Intake Subsystem. An Intake consists of a DC motor or a continuous
rotation servo. Optionally, it may have entry and exit sensors to detect the game element entering or exiting the
Intake and allows callback actions such as stopping the Intake motor.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This class contains all the parameters of the Intake. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFtcIntake
(String instanceName, FtcIntake.Params params) Constructor: Create an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionprivate TrcIntake.TriggerParams
createTriggerParams
(String name, FtcSensorTrigger.SensorType sensorType, TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method creates the trigger parameters for the Intake sensor.This method returns the intake object.
-
Field Details
-
intake
-
-
Constructor Details
-
FtcIntake
Constructor: Create an instance of the object.- Parameters:
instanceName
- specifies the instance name.params
- specifies the parameters to set up the actuator.
-
-
Method Details
-
getIntake
This method returns the intake object.- Returns:
- intake object.
-
createTriggerParams
private TrcIntake.TriggerParams createTriggerParams(String name, FtcSensorTrigger.SensorType sensorType, TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method creates the trigger parameters for the Intake sensor.- Parameters:
name
- specifies name of the sensor.sensorType
- specifies the sensor type.analogSensorData
- specifies the method to call to get analog sensor data (only for SensorType AnalogSensor).sensorInverted
- specifies true if the sensor polarity is inverted, false otherwise.sensorThreshold
- specifies the sensor threshold value if it is an analog sensor, ignored if sensor is digital.triggerCallback
- specifies the callback when trigger event occurred, null if not provided.- Returns:
- created trigger parameters, null if there is no sensor.
-