Add JavaDoc coments
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / subsystems / Intake.java
index 1c891d4837c2709b94335327784e0963cf51107b..de5dc6f4a76cd76cba81515a74fe5f9794619499 100644 (file)
@@ -1,47 +1,49 @@
 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;
 
-/***
- *
- *
+/**
  * @author Meeta
- *
  */
 public class Intake extends Subsystem {
-  public Intake() {
-
-  }
-
-  /**
-   * Runs the intake continuously
-   */
-  public void RunContinous() {
+  public static Intake intake = null;
+  private CANTalon intakeWheel;
+  public static final double INTAKE_SPEED = 0;
 
+  public Intake() {
+    intakeWheel = new CANTalon(Constants.Intake.INTAKE_ROLLER_PORT);
   }
 
-  /**
-   * Starts running the intake for a specific period of time that the user
-   * inputs.
+  /***
+   * It gets the intake instance, and if intake has not been initialized, then
+   * it will be initialized.
    *
-   * @param timeToMove
-   *          in seconds
+   * @returns intake
    */
-  public void RunIntake(double timeToMove) {
-
-  }
-
-  /**
-   * Stops the intake
-   */
-  public void StopIntake() {
-
+  public static Intake getIntake() {
+    if (intake == null) {
+      intake = new Intake();
+    }
+    return intake;
   }
 
   @Override
   protected void initDefaultCommand() {
-    // TODO Auto-generated method stub
 
   }
 
+  /***
+   * Sets speed of intake wheel to input speed
+   *
+   * @param speed
+   *          from -1 to 1
+   */
+  public void setSpeed(double speed) {
+    intakeWheel.set(speed);
+  }
+
 }