Package frc.robot.subsystems.shooter
Class Shooter
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.shooter.Shooter
Class for Shooter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf Both shooter motors are currently at their setpoint within the tolerancevoid
periodic()
If Both shooter motors have a consistent RPM within their Setpoint tolerance for more than 5 cyclesvoid
setBottomMotor
(double voltage) Set voltage to Bottom Shooter Motor**void
setSetpoint
(double setpoint) Set the shooter RPM setpointvoid
setTopMotor
(double voltage) Set voltage to Top Shooter MotorCommand to run the shooter at a set RPM for the speakerspit()
Eject note at a lower speed (for dropping or outtaking into the amp).Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
Shooter
Shooter Subsystem- Parameters:
io
- Shooter IO Layer
-
-
Method Details
-
periodic
public void periodic() -
setTopMotor
public void setTopMotor(double voltage) Set voltage to Top Shooter Motor- Parameters:
voltage
- Voltage to apply to motor
-
setBottomMotor
public void setBottomMotor(double voltage) Set voltage to Bottom Shooter Motor**- Parameters:
voltage
- Voltage to apply to motor
-
atSetpoint
If Both shooter motors are currently at their setpoint within the tolerance- Returns:
- True if at setpoint
-
readyToShoot
If Both shooter motors have a consistent RPM within their Setpoint tolerance for more than 5 cycles- Returns:
- True if at setpoint
-
setSetpoint
public void setSetpoint(double setpoint) Set the shooter RPM setpoint- Parameters:
setpoint
- Setpoint in RPM
-
shootSpeaker
Command to run the shooter at a set RPM for the speaker- Returns:
- Returns a command
-
spit
Eject note at a lower speed (for dropping or outtaking into the amp).
-