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 setIncrementSpeed(double increment
) {
24 double newSpeed
= getCurrentSpeed() + increment
;
26 if (getCurrentSpeed() >= 1.0) {
28 } else if (getCurrentSpeed() <= -1.0) {
35 // THIS DECREMENT METHOD TAKES ONLY POSITIVE VALUES SINCE IT ACCOUNTS FOR
36 // SUBTRACTING THE CURRENT MOTOR SPEED!
37 public void setDecrementSpeed(double decrement
) {
38 double newSpeed
= getCurrentSpeed() - decrement
;
40 if (getCurrentSpeed() >= 1.0) {
42 } else if (getCurrentSpeed() <= -1.0) {
50 protected void initDefaultCommand() {