1 package org
.usfirst
.frc
.team3501
.robot
.commands
.driving
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
10 public class JoystickDrive
extends Command
{
12 public JoystickDrive() {
13 requires(Robot
.driveTrain
);
17 protected void initialize() {
21 protected void execute() {
22 // IDK why but the joystick gives positive values for pulling backwards
23 double left
= -Robot
.oi
.leftJoystick
.getY();
24 double right
= -Robot
.oi
.rightJoystick
.getY();
25 Robot
.driveTrain
.drive(left
, right
);
29 protected boolean isFinished() {
34 protected void end() {
35 Robot
.driveTrain
.stop();
39 protected void interrupted() {