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 * This command will run throughout teleop and listens for joystick inputs to
10 * drive the driveTrain. This never finishes until teleop ends. - works in
11 * conjunction with OI.java
13 public class JoystickDrive
extends Command
{
15 public JoystickDrive() {
16 requires(Robot
.getDriveTrain());
20 protected void initialize() {
24 protected void execute() {
25 // final double thrust = OI.rightJoystick.getY();
26 // final double twist = OI.rightJoystick.getTwist();
28 // Robot.getDriveTrain().joystickDrive(-thrust, -twist);
29 double left
= OI
.leftJoystick
.getY();
30 double right
= OI
.rightJoystick
.getY();
31 Robot
.getDriveTrain().tankDrive(left
, right
);
35 protected boolean isFinished() {
40 protected void end() {
41 Robot
.getDriveTrain().stop();
45 protected void interrupted() {