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
;
8 * Runs throughout teleop and listens for joystick inputs and drives the
9 * driveTrain Never finishes until teleop ends
11 public class JoystickDrive
extends Command
{
13 public JoystickDrive() {
14 requires(Robot
.driveTrain
);
18 protected void initialize() {
22 protected void execute() {
23 double thrust
= Robot
.oi
.leftJoystick
.getY();
24 double twist
= Robot
.oi
.leftJoystick
.getTwist();
26 Robot
.driveTrain
.joystickDrive(thrust
, twist
);
30 protected boolean isFinished() {
35 protected void end() {
36 Robot
.driveTrain
.stop();
40 protected void interrupted() {