X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fintakearm%2FRunIntake.java;h=42ed83fc3f38b5a0c0970f52aa1103fe6c0af63a;hb=e1f7a74216c8845966fb0fa03a08dfeb3868ff3e;hp=eec3b20ad12e38a2b6fcb3d8342d4a5518d9cf44;hpb=fab544eb2395a8aa847abc1890bc635e5ba63a7c;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/intakearm/RunIntake.java b/src/org/usfirst/frc/team3501/robot/commands/intakearm/RunIntake.java index eec3b20a..42ed83fc 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/intakearm/RunIntake.java +++ b/src/org/usfirst/frc/team3501/robot/commands/intakearm/RunIntake.java @@ -1,18 +1,24 @@ package org.usfirst.frc.team3501.robot.commands.intakearm; +import org.usfirst.frc.team3501.robot.Constants; import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.Command; public class RunIntake extends Command { + int direction; - public RunIntake() { + public RunIntake(int direction) { requires(Robot.intakeArm); + this.direction = direction; } @Override protected void initialize() { - Robot.intakeArm.intakeBall(); + if (direction == Constants.IntakeArm.IN) + Robot.intakeArm.intakeBall(); + else + Robot.intakeArm.outputBall(); } @Override