Add JavaDoc comments
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / subsystems / Intake.java
1 package org.usfirst.frc.team3501.robot.subsystems;
2
3 import org.usfirst.frc.team3501.robot.Constants;
4
5 import com.ctre.CANTalon;
6
7 import edu.wpi.first.wpilibj.command.Subsystem;
8
9 /**
10 * Intakes the balls into ball container.
11 *
12 * @author Meeta
13 */
14 public class Intake extends Subsystem {
15 public static Intake intake = null;
16 private CANTalon intakeWheel;
17 public static final double INTAKE_SPEED = 0;
18
19 public Intake() {
20 intakeWheel = new CANTalon(Constants.Intake.INTAKE_ROLLER_PORT);
21 }
22
23 /***
24 * It gets the intake instance, and if intake has not been initialized, then
25 * it will be initialized.
26 *
27 * @returns intake
28 */
29 public static Intake getIntake() {
30 if (intake == null) {
31 intake = new Intake();
32 }
33 return intake;
34 }
35
36 @Override
37 protected void initDefaultCommand() {
38
39 }
40
41 /***
42 * Sets speed of intake wheel to input speed
43 *
44 * @param speed
45 * from -1 to 1
46 */
47 public void setSpeed(double speed) {
48 intakeWheel.set(speed);
49 }
50
51 }