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
    Constructor
    Description
    Subsystem for all shooter related things
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the RPM of the bottom motor
    double
    Get the RPM of the top motor
    void
     
    void
    setBottomSpeed(double speed)
     
    void
    setBottomVolts(double volts)
     
    void
    setSpeed(double speed)
    Set the target speed for the shooter
    void
    setTopSpeed(double speed)
     
    void
    setTopVolts(double volts)
     
    void
    setVoltage(double volts)
    Set the voltage of both top and bottom motors
    void
    setVoltage(double topVolts, double bottomVolts)
    Sets the motors raw voltage input

    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
  • 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()