1 package org
.usfirst
.frc
.team3501
.robot
.commands
.driving
;
3 import org
.usfirst
.frc
.team3501
.robot
.OI
;
4 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
9 * Runs throughout teleop and listens for joystick inputs and drives the
10 * driveTrain Never finishes until teleop ends
12 public class JoystickDrive
extends Command
{
14 public JoystickDrive() {
15 requires(Robot
.driveTrain
);
19 protected void initialize() {
23 protected void execute() {
24 double left
= -OI
.leftJoystick
.getY();
25 double right
= -OI
.rightJoystick
.getY();
26 Robot
.driveTrain
.joystickDrive(left
, right
);
30 protected boolean isFinished() {
35 protected void end() {
36 Robot
.driveTrain
.stop();
40 protected void interrupted() {