1 package org
.usfirst
.frc3501
.RiceCatRobot
.commands
;
3 import org
.usfirst
.frc3501
.RiceCatRobot
.Robot
;
4 import org
.usfirst
.frc3501
.RiceCatRobot
.RobotMap
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 public class MoveToLevel
extends Command
{
10 int targetLevel
, currentLevel
;
12 public MoveToLevel(int targetLevel
) {
13 this.targetLevel
= targetLevel
;
17 protected void initialize() {
22 protected void execute() {
23 Robot
.arm
.setArmSpeeds(RobotMap
.ARM_LOW_SPEED
);
27 protected boolean isFinished() {
28 if(currentLevel
== targetLevel
) return true;
33 protected void end() {
34 Robot
.arm
.setArmSpeeds(0);
38 protected void interrupted() {