change location of Defense enum from Robot.java to Constants.java
authorMeryem Esa <meresa14@gmail.com>
Fri, 29 Jan 2016 04:09:16 +0000 (20:09 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sun, 31 Jan 2016 00:04:37 +0000 (16:04 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java

index c01441f340a181ececf104228dec536c0ad9ce78..71c4a9a7fc19dbc1b3959eee18344f756c2596ae 100644 (file)
@@ -53,4 +53,8 @@ public class Constants {
   public static enum Direction {
     LEFT, RIGHT, DOWN, UP, FORWARD, BACKWARD;
   }
+
+  enum Defense {
+    PORTCULLIS, SALLY_PORT, ROUGH_TERRAIN, LOW_BAR, CHEVAL_DE_FRISE, DRAWBRIDGE, MOAT, ROCK_WALL
+  }
 }
index d2298119c7988ab2a885b8eadfa107c22eda0c36..fbed8a86a8b49005b08f446acb2a4e807471d5a6 100644 (file)
@@ -1,5 +1,6 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.Constants.Defense;
 import org.usfirst.frc.team3501.robot.Constants.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
 
@@ -13,10 +14,6 @@ public class Robot extends IterativeRobot {
   public static DriveTrain driveTrain;
   public static Shooter shooter;
 
-  enum Defense {
-    PORTCULLIS, SALLY_PORT, ROUGH_TERRAIN, LOW_BAR, CHEVAL_DE_FRISE, DRAWBRIDGE, MOAT, ROCK_WALL
-  };
-
   // Sendable Choosers send a drop down menu to the Smart Dashboard.
   SendableChooser positionOneDefense;
   SendableChooser positionTwoDefense;
index fbf2d22c64f43f7f52119a951899b69fb2ce7c47..5eaab4571871a620b165d3d894723a2079a4fe3c 100755 (executable)
@@ -3,26 +3,26 @@ package org.usfirst.frc.team3501.robot.commands;
 import edu.wpi.first.wpilibj.command.CommandGroup;
 
 /**
- *
+ * The default autonomous strategy involves passing the defense that is in front
+ * of it, aiming the robot/ shooter towards the goal, and shooting.
  */
 public class DefaultAutonStrategy extends CommandGroup {
-    
-    public  DefaultAutonStrategy() {
-        // Add Commands here:
-        // e.g. addSequential(new Command1());
-        //      addSequential(new Command2());
-        // these will run in order.
 
-        // To run multiple commands at the same time,
-        // use addParallel()
-        // e.g. addParallel(new Command1());
-        //      addSequential(new Command2());
-        // Command1 and Command2 will run in parallel.
+  public DefaultAutonStrategy(int position, int defense) {
+    /*
+     * pass defense drive forward do what has to be done to pass the defense
+     * drive forward aim face tower aim shooter toward goal shoot
+     */
 
-        // A command group will require all of the subsystems that each member
-        // would require.
-        // e.g. if Command1 requires chassis, and Command2 requires arm,
-        // a CommandGroup containing them would require both the chassis and the
-        // arm.
+    // based on defense pass the defense
+    switch (defense) {
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
     }
+
+  }
+
 }