Commit | Line | Data |
---|---|---|
9738295a SG |
1 | package org.usfirst.frc.team3501.robot.commands.climber; |
2 | ||
a04ce2ff SG |
3 | import org.usfirst.frc.team3501.robot.Robot; |
4 | ||
9738295a SG |
5 | import edu.wpi.first.wpilibj.command.Command; |
6 | ||
7 | /** | |
d0a3a99e | 8 | <<<<<<< HEAD |
e74e5e9d SG |
9 | * <<<<<<< HEAD <<<<<<< 1b45bc927675060d057730fc7c7083fb9d813f66 This command |
10 | * runs the winch motor continuously at a specified speed until the button | |
11 | * triggering it is released. This command also makes the drive train motors run | |
12 | * because the winch is controlled by the drive train. ======= This command will | |
13 | * run the winch motor continuously until the button triggering it is released. | |
14 | * This command also runs the drive train. >>>>>>> Delete StopWinch and Climber | |
15 | * subsystem, edit javadoc comments ======= <<<<<<< | |
16 | * 1b45bc927675060d057730fc7c7083fb9d813f66 This command runs the winch motor | |
17 | * continuously at a specified speed until the button triggering it is released. | |
18 | * This command also makes the drive train motors run because the winch is | |
19 | * controlled by the drive train. ======= This command will run the winch motor | |
20 | * continuously until the button triggering it is released. This command also | |
21 | * runs the drive train. >>>>>>> Delete StopWinch and Climber subsystem, edit | |
22 | * javadoc comments >>>>>>> Delete StopWinch and Climber subsystem, edit javadoc | |
23 | * comments | |
d0a3a99e | 24 | ======= |
25 | * <<<<<<< 1b45bc927675060d057730fc7c7083fb9d813f66 This command runs the winch | |
26 | * motor continuously at a specified speed until the button triggering it is | |
27 | * released. This command also makes the drive train motors run because the | |
28 | * winch is controlled by the drive train. ======= This command will run the | |
29 | * winch motor continuously until the button triggering it is released. This | |
30 | * command also runs the drive train. >>>>>>> Delete StopWinch and Climber | |
31 | * subsystem, edit javadoc comments | |
32 | >>>>>>> Fix merging errors with climber subclass | |
e2e9a7a7 SG |
33 | * |
34 | * pre-condition: This command must be run by a button in OI. The robot must be | |
35 | * attached to the rope. | |
36 | * | |
37 | * post-condition: Winch motor set to a specified speed. | |
38 | * | |
9738295a SG |
39 | * @author shivanighanta |
40 | * | |
41 | */ | |
42 | public class RunWinchContinuous extends Command { | |
43 | private double motorVal; | |
44 | ||
ad877a7e | 45 | /** |
411129cd SG |
46 | * See JavaDoc comment in class for details |
47 | * | |
ad877a7e | 48 | * @param motorVal |
411129cd | 49 | * value range is from -1 to 1 |
ad877a7e | 50 | */ |
9738295a | 51 | public RunWinchContinuous(double motorVal) { |
411129cd | 52 | requires(Robot.getDriveTrain()); |
9738295a SG |
53 | this.motorVal = motorVal; |
54 | } | |
55 | ||
56 | @Override | |
57 | protected void initialize() { | |
411129cd | 58 | Robot.getDriveTrain().setMotorValues(motorVal, motorVal); |
9738295a SG |
59 | } |
60 | ||
61 | @Override | |
62 | protected void execute() { | |
63 | ||
64 | } | |
65 | ||
66 | @Override | |
67 | protected boolean isFinished() { | |
3e515b75 | 68 | return false; |
9738295a SG |
69 | } |
70 | ||
71 | @Override | |
72 | protected void end() { | |
411129cd | 73 | |
9738295a SG |
74 | } |
75 | ||
76 | @Override | |
77 | protected void interrupted() { | |
a04ce2ff | 78 | end(); |
9738295a SG |
79 | } |
80 | } |