1 package org
.usfirst
.frc
.team3501
.robot
.subsystems
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
5 import com
.ctre
.CANTalon
;
7 import edu
.wpi
.first
.wpilibj
.command
.Subsystem
;
12 public class Intake
extends Subsystem
{
13 private static Intake intake
= null;
14 private CANTalon intakeWheel
;
15 public static final double INTAKE_SPEED
= 0;
16 public static final double REVERSE_SPEED
= 0;
19 intakeWheel
= new CANTalon(Constants
.Intake
.INTAKE_ROLLER_PORT
);
23 * It gets the intake instance, and if intake has not been initialized, then
24 * it will be initialized.
28 public static Intake
getIntake() {
30 intake
= new Intake();
36 protected void initDefaultCommand() {
41 * Sets speed of intake wheel to input speed
46 private void setSpeed(double speed
) {
47 intakeWheel
.set(speed
);
51 * Runs the intake wheel at the set intake speed.
53 public void runIntake() {
54 setSpeed(INTAKE_SPEED
);
58 * Stops the intake wheel by setting intake wheel's speed to 0.
60 public void stopIntake() {
65 * Purpose is to release all balls from the ball container to the outside of
66 * the robot. Reverses intake wheel by setting wheel speed to reverse speed.
69 public void runReverseIntake() {
70 setSpeed(REVERSE_SPEED
);