1 package org
.usfirst
.frc3501
.RiceCatRobot
.commands
;
3 import org
.usfirst
.frc3501
.RiceCatRobot
.subsystems
.Arm
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
7 public class MoveArmTillSwitchHit
extends Command
{
8 Arm arm
; //declares the arm object to reference some methods
9 double slowSpeed
= 0.2; //Slow speed to reach a limit switch
11 public MoveArmTillSwitchHit(double leveldesired
) {
12 arm
.setArmSpeeds(slowSpeed
); //Moves the arm to a certain slow speed
15 protected void initialize() {
16 arm
.initializeCounter();
19 protected void execute() {
22 protected boolean isFinished() {
23 return arm
.isSwitchHit();
26 protected void end() {
27 arm
.stop(); //stops arm once limit switch hit
30 protected void interrupted() {