675b4b8cbf52353aa2a70418ee73c5b3ae3f150e
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 // TODO: check all files for control m characters
11 private CANTalon shooter
;
14 shooter
= new CANTalon(Constants
.Shooter
.PORT
);
17 public double getCurrentSetPoint() {
21 public void setSpeed(double speed
) {
24 else if (speed
<= -1.0)
34 public State
getState() {
35 return (this.getCurrentSetPoint() == 0) ? State
.RUNNING
: State
.STOPPED
;
38 // Use negative # for decrement. Positive for increment.
39 public void changeSpeed(double change
) {
40 if (getCurrentSetPoint() + change
>= 1.0)
42 else if (getCurrentSetPoint() + change
<= -1.0)
45 double newSpeed
= getCurrentSetPoint() + change
;
51 protected void initDefaultCommand() {