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
;
11 public class JoystickDrive
extends Command
{
13 public JoystickDrive() {
14 requires(Robot
.getDriveTrain());
18 protected void initialize() {
22 protected void execute() {
23 final double thrust
= OI
.rightJoystick
.getY();
24 final double twist
= OI
.rightJoystick
.getTwist();
26 Robot
.getDriveTrain().joystickDrive(-thrust
, -twist
);
30 protected boolean isFinished() {
35 protected void end() {
36 Robot
.getDriveTrain().stop();
40 protected void interrupted() {