Commit | Line | Data |
---|---|---|
0c916244 SG |
1 | package org.usfirst.frc.team3501.robot.commands.climber; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Robot; | |
150f450f | 4 | import org.usfirst.frc.team3501.robot.subsystems.Climber; |
0c916244 SG |
5 | |
6 | import edu.wpi.first.wpilibj.command.Command; | |
7 | ||
8 | /** | |
9 | * Stops the winch | |
10 | * | |
11 | * @author shivanighanta | |
12 | * | |
13 | */ | |
14 | public class StopWinch extends Command { | |
150f450f | 15 | Climber climber = Robot.getClimber(); |
0c916244 SG |
16 | |
17 | public StopWinch() { | |
150f450f | 18 | requires(climber); |
0c916244 SG |
19 | } |
20 | ||
21 | @Override | |
22 | protected void initialize() { | |
23 | } | |
24 | ||
25 | @Override | |
26 | protected void execute() { | |
27 | } | |
28 | ||
29 | @Override | |
30 | protected boolean isFinished() { | |
31 | return true; | |
32 | } | |
33 | ||
34 | @Override | |
35 | protected void end() { | |
150f450f | 36 | climber.stop(); |
f74d236d | 37 | climber.setCANTalonsBrakeMode(climber.BRAKE_MODE); |
0c916244 SG |
38 | } |
39 | ||
40 | @Override | |
41 | protected void interrupted() { | |
42 | end(); | |
43 | } | |
44 | } |