Modify auton to ramp up in speed
authorHarel Dor <hareldor@gmail.com>
Fri, 25 Mar 2016 22:26:43 +0000 (15:26 -0700)
committerHarel Dor <hareldor@gmail.com>
Fri, 25 Mar 2016 22:26:43 +0000 (15:26 -0700)
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/commands/auton/Auton.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/driving/TimeDrive.java

index e3b51888b5f6a2d65cfb531616bd73db08f33f9d..ec8af1fc9ac79889ddbb42fcbd992c2ad13086ac 100644 (file)
@@ -1,7 +1,7 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.commands.auton.Auton;
 import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
-import org.usfirst.frc.team3501.robot.commands.driving.TimeDrive;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
@@ -43,7 +43,7 @@ public class Robot extends IterativeRobot {
     // Scheduler.getInstance().add(new WaitCommand(1));
     // Scheduler.getInstance().add(new
     // MoveIntakeArm(Constants.IntakeArm.EXTEND));
-    Scheduler.getInstance().add(new TimeDrive(8, -.8));
+    Scheduler.getInstance().add(new Auton());
   }
 
   @Override
diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/Auton.java b/src/org/usfirst/frc/team3501/robot/commands/auton/Auton.java
new file mode 100644 (file)
index 0000000..5768c88
--- /dev/null
@@ -0,0 +1,18 @@
+package org.usfirst.frc.team3501.robot.commands.auton;
+
+import org.usfirst.frc.team3501.robot.commands.driving.TimeDrive;
+
+import edu.wpi.first.wpilibj.command.CommandGroup;
+
+/**
+ *
+ */
+public class Auton extends CommandGroup {
+
+  public Auton() {
+    addSequential(new TimeDrive(.5, -.4));
+    addSequential(new TimeDrive(.5, -.6));
+    addSequential(new TimeDrive(.5, -.8));
+    addSequential(new TimeDrive(7, -1));
+  }
+}
index 4778da85d7cbff1aaa6389d361f85ed4a440448b..26218688352ddaaef3f8bfc1d1469834b84d0670 100644 (file)
@@ -20,7 +20,6 @@ public class TimeDrive extends Command {
 
   public TimeDrive(double time, double speed) {
     requires(Robot.driveTrain);
-    this.setInterruptible(false);
 
     this.setTimeout(time);
     this.speed = speed;