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 getCurrentSetPoint() {
20 public void setSpeed(double speed
) {
23 else if (speed
< -1.0)
33 public State
getState() {
34 return (this.getCurrentSetPoint() == 0) ? State
.RUNNING
: State
.STOPPED
;
37 // Use negative # for decrement. Positive for increment.
38 public void changeSpeed(double change
) {
39 double newSpeed
= getCurrentSetPoint() + change
;
42 else if (newSpeed
< -1.0)
50 protected void initDefaultCommand() {