Commit | Line | Data |
---|---|---|
78b997ee ME |
1 | package org.usfirst.frc.team3501.robot.commands.driving; |
2 | ||
a784e9d2 | 3 | import org.usfirst.frc.team3501.robot.OI; |
78b997ee ME |
4 | import org.usfirst.frc.team3501.robot.Robot; |
5 | ||
6 | import edu.wpi.first.wpilibj.command.Command; | |
7 | ||
8 | /** | |
9 | * | |
10 | */ | |
11 | public class JoystickDrive extends Command { | |
12 | ||
d17d868d | 13 | public JoystickDrive() { |
14 | requires(Robot.getDriveTrain()); | |
15 | } | |
16 | ||
17 | @Override | |
18 | protected void initialize() { | |
19 | } | |
20 | ||
21 | @Override | |
22 | protected void execute() { | |
23 | final double left = OI.leftJoystick.getY(); | |
24 | final double right = OI.rightJoystick.getY(); | |
25 | ||
26 | Robot.getDriveTrain().joystickDrive(left, right); | |
27 | } | |
28 | ||
29 | @Override | |
30 | protected boolean isFinished() { | |
31 | return false; | |
32 | } | |
33 | ||
34 | @Override | |
35 | protected void end() { | |
36 | Robot.getDriveTrain().stop(); | |
37 | } | |
38 | ||
39 | @Override | |
40 | protected void interrupted() { | |
41 | } | |
78b997ee | 42 | } |