Package frc.robot.subsystems
Class ShooterSubsystem
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.ShooterSubsystem
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class ShooterSubsystem
extends edu.wpi.first.wpilibj2.command.SubsystemBase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the RPM of the bottom motordoubleGet the RPM of the top motorvoidperiodic()voidsetBottomSpeed(double speed) voidsetBottomVolts(double volts) voidsetSpeed(double speed) Set the target speed for the shootervoidsetTopSpeed(double speed) voidsetTopVolts(double volts) voidsetVoltage(double volts) Set the voltage of both top and bottom motorsvoidsetVoltage(double topVolts, double bottomVolts) Sets the motors raw voltage inputMethods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd
-
Constructor Details
-
ShooterSubsystem
public ShooterSubsystem()Subsystem for all shooter related things
-
-
Method Details
-
setSpeed
public void setSpeed(double speed) Set the target speed for the shooter- Parameters:
speed- target speed in rpm
-
setBottomSpeed
public void setBottomSpeed(double speed) -
setTopSpeed
public void setTopSpeed(double speed) -
setBottomVolts
public void setBottomVolts(double volts) -
setTopVolts
public void setTopVolts(double volts) -
getTopMotorRPM
public double getTopMotorRPM()Get the RPM of the top motor- Returns:
- Returns RPM of the top motor
-
getBottomMotorRPM
public double getBottomMotorRPM()Get the RPM of the bottom motor- Returns:
- Returns the RPM of the bottom motor
-
setVoltage
public void setVoltage(double topVolts, double bottomVolts) Sets the motors raw voltage input- Parameters:
topVolts- Volts to give the top motor (-12-12)bottomVolts- Volts to give the bottom motor (-12-12)
-
setVoltage
public void setVoltage(double volts) Set the voltage of both top and bottom motors- Parameters:
volts- Target volts for the motors
-
periodic
public void periodic()
-