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);
+ }
+
}