Package frc.robot.subsystems.Shooter
Class Shooter
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.Shooter.Shooter
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
- Direct Known Subclasses:
ShooterRealIO
public abstract class Shooter
extends edu.wpi.first.wpilibj2.command.SubsystemBase
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the setpoint of the pitch PID controller.voidperiodic()voidsetPitchSetpoint(double setpoint) Sets the setpoint of the pitch PID controller.voidsetSpeed(double rpm) Sets the speed of both flywheel motors.voidMethods 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, startEnd
-
Field Details
-
pitch_pid
protected edu.wpi.first.math.controller.PIDController pitch_pid
-
-
Constructor Details
-
Shooter
public Shooter()
-
-
Method Details
-
getPitchSetpoint
public double getPitchSetpoint()Gets the setpoint of the pitch PID controller.- Returns:
- The setpoint of the pitch PID controller.
-
setPitchSetpoint
public void setPitchSetpoint(double setpoint) Sets the setpoint of the pitch PID controller.- Parameters:
setpoint- The desired setpoint
-
setSpeed
public void setSpeed(double rpm) Sets the speed of both flywheel motors.- Parameters:
rpm- The desired speed in rpm.
-
periodic
public void periodic() -
simulationPeriodic
public void simulationPeriodic()
-