Package frclib.subsystem
Class FrcShooter.Params
java.lang.Object
frclib.subsystem.FrcShooter.Params
- Enclosing class:
- FrcShooter
This class contains all the parameters related to the shooter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetPanMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted, TrcShooter.PanTiltParams panParams) This method sets the parameters of pan if there is one.setShooterMotor1(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted) This method sets the parameters of the shooter motor 1.setShooterMotor2(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted) This method sets the parameters of the shooter motor 2.setTiltMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted, TrcShooter.PanTiltParams tiltParams) This method sets the parameters of tilt if there is one.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. -
setShooterMotor1
public FrcShooter.Params setShooterMotor1(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted) This method sets the parameters of the shooter motor 1.- 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.motorBrushless- specifies true if motor is brushless, false if brushed (only applicable for SparkMax).motorAbsEnc- specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).motorInverted- specifies true to invert the motor direction, false otherwise.- Returns:
- this object for chaining.
-
setShooterMotor2
public FrcShooter.Params setShooterMotor2(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted) This method sets the parameters of the shooter motor 2.- 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.motorBrushless- specifies true if motor is brushless, false if brushed (only applicable for SparkMax).motorAbsEnc- specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).motorInverted- specifies true to invert the motor direction, false otherwise.- Returns:
- this object for chaining.
-
setTiltMotor
public FrcShooter.Params setTiltMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted, TrcShooter.PanTiltParams tiltParams) This method sets the parameters of tilt if there is one.- 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.motorBrushless- specifies true if motor is brushless, false if brushed (only applicable for SparkMax).motorAbsEnc- specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).motorInverted- specifies true to invert the motor direction, false otherwise.tiltParams- specifies tilt parameters.- Returns:
- this object for chaining.
-
setPanMotor
public FrcShooter.Params setPanMotor(String motorName, int motorId, FrcMotorActuator.MotorType motorType, boolean motorBrushless, boolean motorAbsEnc, boolean motorInverted, TrcShooter.PanTiltParams panParams) This method sets the parameters of pan if there is one.- 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.motorBrushless- specifies true if motor is brushless, false if brushed (only applicable for SparkMax).motorAbsEnc- specifies true if uses DutyCycle absolute encoder, false to use relative encoder (only applicable for SparkMax).motorInverted- specifies true to invert the motor direction, false otherwise.panParams- specifies pan parameters.- Returns:
- this object for chaining.
-