Add JavaDoc comments
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / subsystems / Intake.java
index f849203d561093a0f5c348e96fcd34a68bdae241..15a82a0061eb2bb321eb9ab86b4927c9d777b478 100644 (file)
@@ -1,22 +1,31 @@
 package org.usfirst.frc.team3501.robot.subsystems;
 
+import org.usfirst.frc.team3501.robot.Constants;
+
 import com.ctre.CANTalon;
 
 import edu.wpi.first.wpilibj.command.Subsystem;
 
 /**
+ * Intakes the balls into ball container.
+ * 
  * @author Meeta
  */
 public class Intake extends Subsystem {
   public static Intake intake = null;
-  protected double speed = 0;
   private CANTalon intakeWheel;
+  public static final double INTAKE_SPEED = 0;
 
-  // create speed of intake whee
   public Intake() {
-
+    intakeWheel = new CANTalon(Constants.Intake.INTAKE_ROLLER_PORT);
   }
 
+  /***
+   * It gets the intake instance, and if intake has not been initialized, then
+   * it will be initialized.
+   *
+   * @returns intake
+   */
   public static Intake getIntake() {
     if (intake == null) {
       intake = new Intake();
@@ -29,8 +38,14 @@ public class Intake extends Subsystem {
 
   }
 
+  /***
+   * Sets speed of intake wheel to input speed
+   *
+   * @param speed
+   *          from -1 to 1
+   */
   public void setSpeed(double speed) {
-    this.speed = speed;
+    intakeWheel.set(speed);
   }
 
 }