X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FIntake.java;h=17ff8fe22413a4e1507644b89a42bc2d4eb203b2;hb=5868b2cf3f43c0b3dd63cac19fa49ca2b2c0571d;hp=15a82a0061eb2bb321eb9ab86b4927c9d777b478;hpb=66b47d2ca76bec93ec081cb8658c09c6a7b906a8;p=3501%2F2017steamworks diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Intake.java b/src/org/usfirst/frc/team3501/robot/subsystems/Intake.java index 15a82a0..17ff8fe 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Intake.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Intake.java @@ -7,14 +7,13 @@ 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; + private static Intake intake = null; private CANTalon intakeWheel; public static final double INTAKE_SPEED = 0; + public static final double REVERSE_SPEED = 0; public Intake() { intakeWheel = new CANTalon(Constants.Intake.INTAKE_ROLLER_PORT); @@ -44,8 +43,31 @@ public class Intake extends Subsystem { * @param speed * from -1 to 1 */ - public void setSpeed(double speed) { + private void setSpeed(double speed) { intakeWheel.set(speed); } + /*** + * Runs the intake wheel at the set intake speed. + */ + public void runIntake() { + setSpeed(INTAKE_SPEED); + } + + /*** + * Stops the intake wheel by setting intake wheel's speed to 0. + */ + public void stopIntake() { + setSpeed(0); + } + + /*** + * Purpose is to release all balls from the ball container to the outside of + * the robot. Reverses intake wheel by setting wheel speed to reverse speed. + * + */ + public void reverseIntake() { + setSpeed(REVERSE_SPEED); + } + }