refactor isUsingTimeToPassDefense to isUsingTime
authorMeryem Esa <meresa14@gmail.com>
Thu, 18 Feb 2016 00:53:57 +0000 (16:53 -0800)
committerMeryem Esa <meresa14@gmail.com>
Thu, 18 Feb 2016 22:07:23 +0000 (14:07 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/commands/auton/AlignToScore.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
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index 7245d5fead8910eb4342f964e24a5efeed5609bf..374c6badaf81712dba1e90107edbf6fd347e26d7 100644 (file)
@@ -230,7 +230,7 @@ public class Constants {
     // Passing Defenses Constants
 
     public static final double DEFAULT_SPEED = 0.5;
     // Passing Defenses Constants
 
     public static final double DEFAULT_SPEED = 0.5;
-    public static boolean isUsingTimeToPassDefense = true;
+    public static boolean isUsingTime = true;
 
     // dead reckoning time and speed constants for driving through defenses
     public static double passRockWallTime = 0;
 
     // dead reckoning time and speed constants for driving through defenses
     public static double passRockWallTime = 0;
index 6d0b9ede6cc1b0688cf466af57967bdd717cebe3..6450fa0342f6b4ffd9e26134942ed36a273556a5 100644 (file)
@@ -39,7 +39,7 @@ public class AlignToScore extends CommandGroup {
   public double horizontalDistToGoal;
 
   public AlignToScore(int position) {
   public double horizontalDistToGoal;
 
   public AlignToScore(int position) {
-    if (Constants.Auton.isUsingTimeToPassDefense) {
+    if (Constants.Auton.isUsingTime) {
       if (position == 1) {
         addSequential(new DriveForTime(Constants.Auton.POS1_DIST1_TIME,
             Constants.Auton.POS1_DRIVE_MAXSPEED));
       if (position == 1) {
         addSequential(new DriveForTime(Constants.Auton.POS1_DIST1_TIME,
             Constants.Auton.POS1_DRIVE_MAXSPEED));
index 8f35a25cd393b9275d317cec4ac5f67a0101e557..9ee3e6eeaff831dfadd8f25d2a639f528930e3cf 100644 (file)
@@ -25,7 +25,7 @@ import edu.wpi.first.wpilibj.command.CommandGroup;
 public class PassLowBar extends CommandGroup {
 
   public PassLowBar() {
 public class PassLowBar extends CommandGroup {
 
   public PassLowBar() {
-    if (Constants.Auton.isUsingTimeToPassDefense) {
+    if (Constants.Auton.isUsingTime) {
       addSequential(new DriveForTime(Constants.Auton.passLowBarTime,
           Constants.Auton.passLowBarSpeed));
     }
       addSequential(new DriveForTime(Constants.Auton.passLowBarTime,
           Constants.Auton.passLowBarSpeed));
     }
index 3539d970e858dd67952d5229779626d1a16fcff7..b0f2b8426a00ba1b42155a83430ec5fbcc743f74 100755 (executable)
@@ -28,7 +28,7 @@ import edu.wpi.first.wpilibj.command.CommandGroup;
 public class PassMoat extends CommandGroup {
 
   public PassMoat() {
 public class PassMoat extends CommandGroup {
 
   public PassMoat() {
-    if (Constants.Auton.isUsingTimeToPassDefense) {
+    if (Constants.Auton.isUsingTime) {
       addSequential(new DriveForTime(Constants.Auton.passMoatTime,
           Constants.Auton.passMoatSpeed));
     }
       addSequential(new DriveForTime(Constants.Auton.passMoatTime,
           Constants.Auton.passMoatSpeed));
     }
index 30051460e11e157ac509de7cf81bda5d12543b47..e5af033e9a85272f118ee7925e360a6b2b6d5b51 100755 (executable)
@@ -26,7 +26,7 @@ public class PassRampart extends CommandGroup {
 
   public PassRampart() {
 
 
   public PassRampart() {
 
-    if (Constants.Auton.isUsingTimeToPassDefense) {
+    if (Constants.Auton.isUsingTime) {
       addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
           Constants.Auton.passRockWallSpeed));
     }
       addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
           Constants.Auton.passRockWallSpeed));
     }
index a0b6690c22049849c20ef8deaa07438a15c346a3..dae5e038ad86b3b6baa8a9c23b63cc352cc2ebd6 100755 (executable)
@@ -25,7 +25,7 @@ import edu.wpi.first.wpilibj.command.CommandGroup;
 public class PassRockWall extends CommandGroup {
 
   public PassRockWall() {
 public class PassRockWall extends CommandGroup {
 
   public PassRockWall() {
-    if (Constants.Auton.isUsingTimeToPassDefense) {
+    if (Constants.Auton.isUsingTime) {
       addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
           Constants.Auton.passRockWallSpeed));
     }
       addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
           Constants.Auton.passRockWallSpeed));
     }
index e3d64dde31246f1030c8ae80830e33b87b239650..f1b037260a9c51293fde66915e21744af40e82a7 100644 (file)
@@ -26,7 +26,7 @@ public class PassRoughTerrain extends CommandGroup {
 
   public PassRoughTerrain() {
 
 
   public PassRoughTerrain() {
 
-    if (Constants.Auton.isUsingTimeToPassDefense) {
+    if (Constants.Auton.isUsingTime) {
       addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
           Constants.Auton.passRockWallSpeed));
     }
       addSequential(new DriveForTime(Constants.Auton.passRockWallTime,
           Constants.Auton.passRockWallSpeed));
     }
index 9852848e1c1a49fac411fe0ae876f1ffe302d51b..e19b46f02643a6c24af4d7d261ae9f13fb6c74a8 100644 (file)
@@ -368,6 +368,6 @@ public class DriveTrain extends PIDSubsystem {
   }
 
   public void toggleTimeDeadReckoning() {
   }
 
   public void toggleTimeDeadReckoning() {
-    Constants.Auton.isUsingTimeToPassDefense = !Constants.Auton.isUsingTimeToPassDefense;
+    Constants.Auton.isUsingTime = !Constants.Auton.isUsingTime;
   }
 }
   }
 }