From 5d8fe6b4174cc6216383c03ebdeef3a7ed84d8cc Mon Sep 17 00:00:00 2001 From: niyatisriram Date: Tue, 9 Feb 2016 19:04:38 -0800 Subject: [PATCH] Add to ToggleBallRollerIntake command --- .../frc/team3501/robot/commands/ToggleBallRollerIntake.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/usfirst/frc/team3501/robot/commands/ToggleBallRollerIntake.java b/src/org/usfirst/frc/team3501/robot/commands/ToggleBallRollerIntake.java index d7581486..4ae8f5f5 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/ToggleBallRollerIntake.java +++ b/src/org/usfirst/frc/team3501/robot/commands/ToggleBallRollerIntake.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.robot.Robot; + import edu.wpi.first.wpilibj.command.Command; public class ToggleBallRollerIntake extends Command { @@ -10,6 +12,10 @@ public class ToggleBallRollerIntake extends Command { @Override protected void initialize() { + if (areRollersRolling()) { + Robot.intakeArm.stopRollers(); + } else + Robot.intakeArm.intakeBall(); } @Override -- 2.30.2