Add camera, change to arcade drive, front chooser only, minor driving fixes
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / driving / JoystickDrive.java
index 41e44d31cf2b4109152d888197045ae3a5cd3110..c246ccfac9954a314437ca7ee4283e66d774d938 100644 (file)
@@ -1,11 +1,13 @@
 package org.usfirst.frc.team3501.robot.commands.driving;
 
+import org.usfirst.frc.team3501.robot.OI;
 import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.command.Command;
 
 /**
- *
+ * Runs throughout teleop and listens for joystick inputs and drives the
+ * driveTrain Never finishes until teleop ends
  */
 public class JoystickDrive extends Command {
 
@@ -19,9 +21,8 @@ public class JoystickDrive extends Command {
 
   @Override
   protected void execute() {
-    // IDK why but the joystick gives positive values for pulling backwards
-    double left = -Robot.oi.leftJoystick.getY();
-    double right = -Robot.oi.rightJoystick.getY();
+    double left = -OI.leftJoystick.getY();
+    double right = -OI.rightJoystick.getX();
     Robot.driveTrain.drive(left, right);
   }
 
@@ -37,6 +38,5 @@ public class JoystickDrive extends Command {
 
   @Override
   protected void interrupted() {
-    end();
   }
 }