Package frclib.subsystem
Class FrcIntake.Params
java.lang.Object
frclib.subsystem.FrcIntake.Params
- Enclosing class:
- FrcIntake
This class contains all the parameters of the Intake.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetEntryAnalogInput
(int sensorChannel, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog input sensor parameters.setEntryAnalogSensor
(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog sensor parameters.setEntryDigitalInput
(int sensorChannel, boolean sensorInverted, TrcEvent.Callback triggerCallback) This method specifies the entry digital input sensor parameters.setExitAnalogInput
(int sensorChannel, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog input sensor parameters.setExitAnalogSensor
(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog sensor parameters.setExitDigitalInput
(int sensorChannel, boolean sensorInverted, TrcEvent.Callback triggerCallback) This method specifies the exit digital input sensor parameters.setFollowerMotor
(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean brushless, boolean absEnc, boolean inverted) This method sets the parameters of the follower motor.setPrimaryMotor
(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean brushless, boolean absEnc, boolean inverted) This method sets the parameters of the primary motor.toString()
This method returns the string format of the Params info.
-
Constructor Details
-
Params
public Params()
-
-
Method Details
-
toString
This method returns the string format of the Params info. -
setPrimaryMotor
public FrcIntake.Params setPrimaryMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean brushless, boolean absEnc, boolean inverted) This method sets the parameters of the primary motor.- Parameters:
motorName
- specifies the name of the motor.motorId
- specifies the ID for the motor (CAN ID for CAN motor, PWM channel for PWM motor).motorType
- specifies the motor type.brushless
- specifies true if motor is brushless, false if brushed (only applicable for SparkMax).absEnc
- specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).inverted
- specifies true to invert the motor direction, false otherwise.- Returns:
- this object for chaining.
-
setFollowerMotor
public FrcIntake.Params setFollowerMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean brushless, boolean absEnc, boolean inverted) This method sets the parameters of the follower motor.- Parameters:
motorName
- specifies the name of the motor.motorId
- specifies the ID for the motor (CAN ID for CAN motor, PWM channel for PWM motor).motorType
- specifies the motor type.brushless
- specifies true if motor is brushless, false if brushed (only applicable for SparkMax).absEnc
- specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).inverted
- specifies true to invert the motor direction, false otherwise.- Returns:
- this object for chaining.
-
setEntryDigitalInput
public FrcIntake.Params setEntryDigitalInput(int sensorChannel, boolean sensorInverted, TrcEvent.Callback triggerCallback) This method specifies the entry digital input sensor parameters.- Parameters:
sensorChannel
- specifies the digital input channel the sensor is plugged into.sensorInverted
- 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 FrcIntake.Params setEntryAnalogInput(int sensorChannel, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog input sensor parameters.- Parameters:
sensorChannel
- specifies the analog input channel the sensor is plugged into.sensorInverted
- specifies true if the sensor polarity is inverted, false otherwise.sensorThreshold
- 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 FrcIntake.Params setEntryAnalogSensor(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the entry analog sensor parameters.- Parameters:
analogSensorData
- specifies the method to call to get the analog sensor data.sensorInverted
- specifies true if the sensor polarity is inverted, false otherwise.sensorThreshold
- 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 FrcIntake.Params setExitDigitalInput(int sensorChannel, boolean sensorInverted, TrcEvent.Callback triggerCallback) This method specifies the exit digital input sensor parameters.- Parameters:
sensorChannel
- specifies the digital input channel the sensor is plugged into.sensorInverted
- 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 FrcIntake.Params setExitAnalogInput(int sensorChannel, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog input sensor parameters.- Parameters:
sensorChannel
- specifies the analog input channel the sensor is plugged into.sensorInverted
- specifies true if the sensor polarity is inverted, false otherwise.sensorThreshold
- 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 FrcIntake.Params setExitAnalogSensor(TrcAnalogSensor.AnalogDataSource analogSensorData, boolean sensorInverted, double sensorThreshold, TrcEvent.Callback triggerCallback) This method specifies the exit analog sensor parameters.- Parameters:
analogSensorData
- specifies the method to call to get the analog sensor data.sensorInverted
- specifies true if the sensor polarity is inverted, false otherwise.sensorThreshold
- specifies the sensor threshold value.triggerCallback
- specifies the callback method when trigger event occurred, null if not provided.- Returns:
- this object for chaining.
-