implement tank drive and toggle winch
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / driving / JoystickDrive.java
CommitLineData
78b997ee
ME
1package org.usfirst.frc.team3501.robot.commands.driving;
2
a784e9d2 3import org.usfirst.frc.team3501.robot.OI;
78b997ee
ME
4import org.usfirst.frc.team3501.robot.Robot;
5
6import edu.wpi.first.wpilibj.command.Command;
7
8/**
3ef4d379 9 * This command will run throughout teleop and listens for joystick inputs to
f0a71840
CZ
10 * drive the driveTrain. This never finishes until teleop ends. - works in
11 * conjunction with OI.java
78b997ee
ME
12 */
13public class JoystickDrive extends Command {
14
d17d868d 15 public JoystickDrive() {
16 requires(Robot.getDriveTrain());
17 }
18
19 @Override
20 protected void initialize() {
21 }
22
23 @Override
24 protected void execute() {
ba9f0b12
CZ
25 // final double thrust = OI.rightJoystick.getY();
26 // final double twist = OI.rightJoystick.getTwist();
27 //
28 // Robot.getDriveTrain().joystickDrive(-thrust, -twist);
29 double left = OI.leftJoystick.getY();
30 double right = OI.rightJoystick.getY();
31 Robot.getDriveTrain().tankDrive(left, right);
d17d868d 32 }
33
34 @Override
35 protected boolean isFinished() {
36 return false;
37 }
38
39 @Override
40 protected void end() {
41 Robot.getDriveTrain().stop();
42 }
43
44 @Override
45 protected void interrupted() {
46 }
78b997ee 47}