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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the setpoint of the pitch PID controller.void
periodic()
void
setPitchSetpoint
(double setpoint) Sets the setpoint of the pitch PID controller.void
setSpeed
(double rpm) Sets the speed of both flywheel motors.void
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, 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()
-