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
.command
.Subsystem
;
8 public class Shooter
extends Subsystem
{
12 wheel
= new CANTalon(Constants
.Shooter
.SHOOTER_WHEEL_PORT
);
15 public double getCurrentSpeed() {
19 public void setSpeed(double speed
) {
23 public void incrementSpeed(double increment
) {
24 if (getCurrentSpeed() >= 1.0)
26 else if (getCurrentSpeed() <= -1.0)
29 double newSpeed
= getCurrentSpeed() + increment
;
34 // THIS DECREMENT METHOD TAKES ONLY POSITIVE VALUES SINCE IT ACCOUNTS FOR
35 // SUBTRACTING THE CURRENT MOTOR SPEED!
36 public void decrementSpeed(double decrement
) {
38 if (getCurrentSpeed() >= 1.0)
40 else if (getCurrentSpeed() <= -1.0)
43 double newSpeed
= getCurrentSpeed() - decrement
;
49 protected void initDefaultCommand() {