Add testing stuff
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / DriveTrain.java
index 203078ccfd7f88d9103b8a6ddf4ac529b6212c4c..cde94b8f6a103c2d1e8115ada1d10227e3f52410 100644 (file)
@@ -28,7 +28,7 @@ public class DriveTrain extends PIDSubsystem {
   private RobotDrive robotDrive;
 
   private GyroLib gyro;
-  private DoubleSolenoid leftGearPiston, rightGearPiston;
+  public DoubleSolenoid leftGearPiston, rightGearPiston;
 
   // Drivetrain specific constants that relate to the inches per pulse value for
   // the encoders
@@ -62,9 +62,10 @@ public class DriveTrain extends PIDSubsystem {
     this.disable();
     gyro.start();
 
-    leftGearPiston = new DoubleSolenoid(Constants.DriveTrain.LEFT_FORWARD,
+    leftGearPiston = new DoubleSolenoid(10, Constants.DriveTrain.LEFT_FORWARD,
         Constants.DriveTrain.LEFT_REVERSE);
-    rightGearPiston = new DoubleSolenoid(Constants.DriveTrain.RIGHT_FORWARD,
+    rightGearPiston = new DoubleSolenoid(10,
+        Constants.DriveTrain.RIGHT_FORWARD,
         Constants.DriveTrain.RIGHT_REVERSE);
     Constants.DriveTrain.inverted = false;
   }
@@ -212,11 +213,12 @@ public class DriveTrain extends PIDSubsystem {
         output = Math.signum(output) * 0.3;
       left = output;
       right = output + drift * Constants.DriveTrain.kp / 10;
+      drive(left, right);
     } else if (DRIVE_MODE == Constants.DriveTrain.GYRO_MODE) {
       left = output;
       right = -output;
+      arcadeDrive(0, output);
     }
-    drive(left, right);
     pidOutput = output;
   }
 
@@ -256,6 +258,10 @@ public class DriveTrain extends PIDSubsystem {
       robotDrive.tankDrive(right, left);
   }
 
+  public void arcadeDrive(double y, double twist) {
+    robotDrive.arcadeDrive(y, twist);
+  }
+
   /*
    * constrains the distance to within -100 and 100 since we aren't going to
    * drive more than 100 inches