create dead-reckoning class in Constants.java
authorMeryem Esa <meresa14@gmail.com>
Sun, 14 Feb 2016 18:45:30 +0000 (10:45 -0800)
committerMeryem Esa <meresa14@gmail.com>
Mon, 15 Feb 2016 01:01:32 +0000 (17:01 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/commands/driving/TurnForTime.java

index 3304a101a858db6d9495c7b58d45b372f8c4e84f..e0949205041d2167c8868cafa8032603d1ac6837 100644 (file)
@@ -87,6 +87,10 @@ public class Constants {
     }
   }
 
+  public static class DeadReckoning {
+    public static final double DEFAULT_SPEED = 0.5;
+  }
+
   public static class IntakeArm {
     public static final int ROLLER_PORT = 0;
     public static final int ARM_PORT = 1;
index 3ec3974d7b1fb9e9d64338cf4cad744c3a22e7da..acddeaa54a355c38a9883db367b4b260bcffb1fb 100755 (executable)
@@ -1,5 +1,6 @@
 package org.usfirst.frc.team3501.robot.commands.driving;
 
+import org.usfirst.frc.team3501.robot.Constants.DeadReckoning;
 import org.usfirst.frc.team3501.robot.Constants.Direction;
 import org.usfirst.frc.team3501.robot.Robot;
 
@@ -20,7 +21,6 @@ import edu.wpi.first.wpilibj.command.Command;
  */
 
 public class TurnForTime extends Command {
-  private static final double DEFAULT_SPEED = 0.5;
   private Direction direction;
   private double seconds;
   private Timer timer;
@@ -33,7 +33,7 @@ public class TurnForTime extends Command {
   }
 
   public TurnForTime(double seconds, Direction direction) {
-    this(seconds, direction, DEFAULT_SPEED);
+    this(seconds, direction, DeadReckoning.DEFAULT_SPEED);
   }
 
   @Override