| 1 | package org.usfirst.frc.team3501.robot.commands; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Robot; |
| 4 | |
| 5 | import edu.wpi.first.wpilibj.command.Command; |
| 6 | |
| 7 | public class WinchRobotUpContinuous extends Command { |
| 8 | double winchUpSpeed; |
| 9 | |
| 10 | public WinchRobotUpContinuous(double speed) { |
| 11 | winchUpSpeed = speed; |
| 12 | if (winchUpSpeed > 1) |
| 13 | winchUpSpeed = 1; |
| 14 | if (winchUpSpeed < -1) |
| 15 | winchUpSpeed = -1; |
| 16 | } |
| 17 | |
| 18 | @Override |
| 19 | protected void initialize() { |
| 20 | Robot.scaler.runWinch(winchUpSpeed); |
| 21 | } |
| 22 | |
| 23 | @Override |
| 24 | protected void execute() { |
| 25 | } |
| 26 | |
| 27 | @Override |
| 28 | protected boolean isFinished() { |
| 29 | return true; |
| 30 | } |
| 31 | |
| 32 | @Override |
| 33 | protected void end() { |
| 34 | } |
| 35 | |
| 36 | @Override |
| 37 | protected void interrupted() { |
| 38 | } |
| 39 | } |