change all the pass defense constants to finals
authorMeryem Esa <meresa14@gmail.com>
Thu, 18 Feb 2016 21:48:52 +0000 (13:48 -0800)
committerMeryem Esa <meresa14@gmail.com>
Thu, 18 Feb 2016 22:07:24 +0000 (14:07 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java
src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java
src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java
src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java

index 374c6badaf81712dba1e90107edbf6fd347e26d7..bbc7a3b88b420a49f786ffe9f6582cde1ec33f0d 100644 (file)
@@ -233,21 +233,22 @@ public class Constants {
     public static boolean isUsingTime = true;
 
     // dead reckoning time and speed constants for driving through defenses
-    public static double passRockWallTime = 0;
-    public static double passRockWallSpeed = 0;
-    public static double passRockWallDistance = 0;
-    public static double passLowBarTime = 0;
-    public static double passLowBarSpeed = 0;
-    public static double passLowBarDistance = 0;
-    public static double passMoatTime = 0;
-    public static double passMoatSpeed = 0;
-    public static double passMoatDistance = 0;
-    public static double passRampartTime = 0;
-    public static double passRampartSpeed = 0;
-    public static double passRampartDistance = 0;
-    public static double passRoughTerrainTime = 0;
-    public static double passRoughTerrainSpeed = 0;
-    public static double passRoughTerrainDistance = 0;
+    // TODO: find the times it takes to pass each defense
+    public static final double PASS_ROCK_WALL_TIME = 0;
+    public static final double PASS_ROCK_WALL_SPEED = 0;
+    public static final double PASS_ROCK_WALL_DIST = 0;
+    public static final double PASS_LOW_BAR_TIME = 0;
+    public static final double PASS_LOW_BAR_SPEED = 0;
+    public static final double PASS_LOW_BAR_DIST = 0;
+    public static final double PASS_MOAT_TIME = 0;
+    public static final double PASS_MOAT_SPEED = 0;
+    public static final double PASS_MOAT_DIST = 0;
+    public static final double PASS_RAMPART_TIME = 0;
+    public static final double PASS_RAMPART_SPEED = 0;
+    public static final double PASS_RAMPART_DIST = 0;
+    public static final double PASS_ROUGH_TERRAIN_TIME = 0;
+    public static final double PASS_ROUGH_TERRAIN_SPEED = 0;
+    public static final double PASS_ROUGH_TERRAIN_DIST = 0;
   }
 
   public enum Direction {
index 9ee3e6eeaff831dfadd8f25d2a639f528930e3cf..fe35684f9e1d38870759c9d6d68cd4fcc476f47a 100644 (file)
@@ -26,12 +26,12 @@ public class PassLowBar extends CommandGroup {
 
   public PassLowBar() {
     if (Constants.Auton.isUsingTime) {
-      addSequential(new DriveForTime(Constants.Auton.passLowBarTime,
-          Constants.Auton.passLowBarSpeed));
+      addSequential(new DriveForTime(Constants.Auton.PASS_LOW_BAR_TIMEpassLowBarTime,
+          Constants.Auton.PASS_LOW_BAR_SPEED));
     }
     else {
       addSequential(new DriveDistance(
-          Constants.Auton.passLowBarDistance,
+          Constants.Auton.PASS_LOW_BAR_DIST,
           Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
     }
   }
index b0f2b8426a00ba1b42155a83430ec5fbcc743f74..de789f75b765e71d58130e66f39cd71a22db94ef 100755 (executable)
@@ -29,11 +29,11 @@ public class PassMoat extends CommandGroup {
 
   public PassMoat() {
     if (Constants.Auton.isUsingTime) {
-      addSequential(new DriveForTime(Constants.Auton.passMoatTime,
-          Constants.Auton.passMoatSpeed));
+      addSequential(new DriveForTime(Constants.Auton.PASS_MOAT_TIME,
+          Constants.Auton.PASS_MOAT_SPEED));
     }
     else {
-      addSequential(new DriveDistance(Constants.Auton.passMoatDistance,
+      addSequential(new DriveDistance(Constants.Auton.PASS_MOAT_DIST,
           Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
     }
 
index e5af033e9a85272f118ee7925e360a6b2b6d5b51..acd24469a86fbacefaf859c0c39cad36726463a5 100755 (executable)
@@ -27,12 +27,12 @@ public class PassRampart extends CommandGroup {
   public PassRampart() {
 
     if (Constants.Auton.isUsingTime) {
-      addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
+      addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
           Constants.Auton.passRockWallSpeed));
     }
     else {
       addSequential(new DriveDistance(
-          Constants.Auton.passRampartDistance,
+          Constants.Auton.PASS_RAMPART_DIST,
           Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
     }
 
index dae5e038ad86b3b6baa8a9c23b63cc352cc2ebd6..73368d7e1793c62dfcf5ca99eee4e0c30b1b0a5b 100755 (executable)
@@ -26,12 +26,12 @@ public class PassRockWall extends CommandGroup {
 
   public PassRockWall() {
     if (Constants.Auton.isUsingTime) {
-      addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
+      addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
           Constants.Auton.passRockWallSpeed));
     }
     else {
       addSequential(new DriveDistance(
-          Constants.Auton.passRockWallDistance,
+          Constants.Auton.PASS_ROCK_WALL_DIST,
           Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
     }
 
index f1b037260a9c51293fde66915e21744af40e82a7..a1783de214c36c23b811dbe5133ef09ae3ff5b3d 100644 (file)
@@ -27,12 +27,12 @@ public class PassRoughTerrain extends CommandGroup {
   public PassRoughTerrain() {
 
     if (Constants.Auton.isUsingTime) {
-      addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
+      addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
           Constants.Auton.passRockWallSpeed));
     }
     else {
       addSequential(new DriveDistance(
-          Constants.Auton.passRoughTerrainDistance,
+          Constants.Auton.PASS_ROUGH_TERRAIN_DIST,
           Constants.DriveTrain.PASS_DEFENSE_TIMEOUT));
     }