change code so it fits new measurements
authorMichael Wang <michaelwang9000@gmail.com>
Sun, 19 Feb 2017 19:37:29 +0000 (11:37 -0800)
committerMichael Wang <michaelwang9000@gmail.com>
Tue, 21 Feb 2017 20:40:26 +0000 (12:40 -0800)
src/org/usfirst/frc/team3501/robot/commandgroups/AutonHopperShoot.java

index 18b590548b6b7eb94b2121f3a234fc47435f2f65..02f8e7e4d454980d8726e22f5333f934e0943713 100644 (file)
@@ -13,28 +13,21 @@ import edu.wpi.first.wpilibj.command.CommandGroup;
  */
 public class AutonHopperShoot extends CommandGroup {
 
-  private static final double DISTANCE_TO_HOPPER = 224.569677;
-  private static final double DISTANCE_TO_TURNING_POSITION = 5.0;
-
   public AutonHopperShoot() {
     // Robot drives from center to front of airship
-    addSequential(new DriveDistance(DISTANCE_TO_TURNING_POSITION, 0.75));
+    addSequential(new DriveDistance(94.75, 0.75));
     // Robot turns towards hopper
-    addSequential(new TurnForAngle(45.0, Constants.Direction.RIGHT, 1.0));
-    // Robot drives near hopper
-    addSequential(new DriveDistance(DISTANCE_TO_HOPPER, 1));
-    // Robot turns right towards hopper
-    addSequential(new TurnForAngle(45.0, Constants.Direction.RIGHT, 1.0));
+    addSequential(new TurnForAngle(90.0, Constants.Direction.RIGHT, 1.0));
     // Robot drives into hopper switch
-    addSequential(new DriveDistance(2.0, 1.0));
+    addSequential(new DriveDistance(44.0, 1));
     // Robot backs up from switch
-    addSequential(new DriveDistance(2.0, -1.0));
+    addSequential(new DriveDistance(5.0, -1.0));
     // Robot turns towards the boiler
     addSequential(new TurnForAngle(90.0, Constants.Direction.RIGHT, 1.0));
     // Robot drives to boiler
-    addSequential(new DriveDistance(123.3, 1.0));
+    addSequential(new DriveDistance(75.7, 0.75));
     // Robot turns parallel to boiler
-    addSequential(new TurnForAngle(45.0, Constants.Direction.LEFT, 1.0));
+    addSequential(new TurnForAngle(46.6, Constants.Direction.LEFT, 1.0));
     // Shoot
     addSequential(new RunFlyWheelContinuous());