1 package org
.usfirst
.frc
.team3501
.robot
.subsystems
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
4 import org
.usfirst
.frc
.team3501
.robot
.Constants
.Shooter
.State
;
6 import edu
.wpi
.first
.wpilibj
.CANTalon
;
7 import edu
.wpi
.first
.wpilibj
.command
.Subsystem
;
9 public class Shooter
extends Subsystem
{
10 private CANTalon shooter
;
13 shooter
= new CANTalon(Constants
.Shooter
.PORT
);
16 public double getCurrentSpeed() {
20 public void setSpeed(double speed
) {
28 public State
getState() {
29 return (this.getCurrentSpeed() == 0) ? State
.RUNNING
: State
.STOPPED
;
32 // Use negative # for decrement. Positive for increment.
33 public void changeSpeed(double change
) {
34 if (getCurrentSpeed() + change
>= 1.0)
36 else if (getCurrentSpeed() + change
<= -1.0)
39 double newSpeed
= getCurrentSpeed() + change
;
45 protected void initDefaultCommand() {