1 package org
.usfirst
.frc
.team3501
.robot
.subsystems
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
5 import edu
.wpi
.first
.wpilibj
.CANTalon
;
6 import edu
.wpi
.first
.wpilibj
.DoubleSolenoid
;
7 import edu
.wpi
.first
.wpilibj
.command
.Subsystem
;
9 public class Shooter
extends Subsystem
{
10 private CANTalon shooter
;
11 private DoubleSolenoid punch
;
14 shooter
= new CANTalon(Constants
.Shooter
.PORT
);
15 punch
= new DoubleSolenoid(Constants
.Shooter
.FORWARD_PORT
,
16 Constants
.Shooter
.REVERSE_PORT
);
19 public double getCurrentSetPoint() {
23 public void setSpeed(double speed
) {
26 else if (speed
< -1.0)
36 // Use negative # for decrement. Positive for increment.
37 public void changeSpeed(double change
) {
38 double newSpeed
= getCurrentSetPoint() + change
;
41 else if (newSpeed
< -1.0)
50 punch
.set(Constants
.Shooter
.punch
);
53 public void resetPunch() {
54 punch
.set(Constants
.Shooter
.retract
);
58 protected void initDefaultCommand() {