Package frc.robot.superstructure
Class ShooterValues
java.lang.Object
frc.robot.superstructure.ShooterValues
An object that represents a state that the shooter can be in. This includes the flywheel speed, turret position, and hood position.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ShooterValues with zero values.ShooterValues(AngularVelocity flywheelSpeed, Angle hoodAngle, Angle turretAngle) Creates a new ShooterValues with specified values. -
Method Summary
Modifier and TypeMethodDescriptionGets the flywheel speed.Gets the hood angle.Gets the turret angle.setFlywheelSpeed(AngularVelocity flywheelSpeed) Sets the flywheel speed to a specificAngularVelocity.setGamepieceSpeed(LinearVelocity gamepieceSpeed) Sets the flywheel speed as aLinearVelocityto shoot the gamepiece at (exit velocity).setGamepieceTheta(Angle gamepieceTheta) Sets the hood angle as anAngleto shoot the gamepiece at (exit angle).setHoodAngle(Angle hoodAngle) Sets the hood angle.setTurretAngle(Angle turretAngle) Sets the turret angle.toString()
-
Constructor Details
-
ShooterValues
public ShooterValues()Creates a new ShooterValues with zero values. -
ShooterValues
Creates a new ShooterValues with specified values.- Parameters:
flywheelSpeed- The velocity to spin the flywheel up to.hoodAngle- The angle to set the hood to.turretAngle- The angle to point the turret at.
-
-
Method Details
-
setFlywheelSpeed
Sets the flywheel speed to a specificAngularVelocity.- Parameters:
flywheelSpeed- The velocity to spin the flywheel up to.- Returns:
- This object for method chaining.
-
setGamepieceSpeed
Sets the flywheel speed as aLinearVelocityto shoot the gamepiece at (exit velocity).- Parameters:
gamepieceSpeed- The velocity to shoot the gamepiece at.- Returns:
- This object for method chaining.
-
setTurretAngle
Sets the turret angle.- Parameters:
turretAngle- The angle to point the turret at.- Returns:
- This object for method chaining.
-
setHoodAngle
Sets the hood angle.- Parameters:
hoodAngle- The angle to set the hood to.- Returns:
- This object for method chaining.
-
setGamepieceTheta
Sets the hood angle as anAngleto shoot the gamepiece at (exit angle).- Parameters:
gamepieceTheta- The angle to shoot the gamepiece at.- Returns:
- This object for method chaining.
-
getFlywheelSpeed
Gets the flywheel speed.- Returns:
- The flywheel speed.
-
getTurretAngle
Gets the turret angle.- Returns:
- The turret angle.
-
getHoodAngle
Gets the hood angle.- Returns:
- The hood angle.
-
toString
-