Change shooter to function off of two pistons, remove punch, shooter motors, and... harel/shooter-update
authorHarel Dor <hareldor@gmail.com>
Thu, 3 Mar 2016 05:20:33 +0000 (21:20 -0800)
committerHarel Dor <hareldor@gmail.com>
Thu, 3 Mar 2016 05:20:33 +0000 (21:20 -0800)
13 files changed:
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/OI.java
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/commands/auton/CompactRobot.java
src/org/usfirst/frc/team3501/robot/commands/shooter/ChangeShooterSpeed.java [deleted file]
src/org/usfirst/frc/team3501/robot/commands/shooter/ExtendPunch.java [deleted file]
src/org/usfirst/frc/team3501/robot/commands/shooter/FireCatapult.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/shooter/RetractPunch.java [deleted file]
src/org/usfirst/frc/team3501/robot/commands/shooter/SetShooterSpeed.java [deleted file]
src/org/usfirst/frc/team3501/robot/commands/shooter/Shoot.java
src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java [deleted file]
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java

index 4810e4b92c8abe1e748705f1d487854f821ff610..d34a08e87e56fb457aa2544f9cf0bf3d420b82da 100644 (file)
@@ -2,8 +2,6 @@ package org.usfirst.frc.team3501.robot;
 
 import edu.wpi.first.wpilibj.DoubleSolenoid;
 import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
-import edu.wpi.first.wpilibj.I2C;
-import edu.wpi.first.wpilibj.I2C.Port;
 
 /**
  * The Constants stores constant values for all subsystems. This includes the
@@ -12,6 +10,9 @@ import edu.wpi.first.wpilibj.I2C.Port;
  */
 
 public class Constants {
+  public final static int PCM_MODULE_A = 9;
+  public final static int PCM_MODULE_B = 10;
+
   public static class OI {
     // Computer Ports
     public final static int LEFT_STICK_PORT = 0;
@@ -53,8 +54,7 @@ public class Constants {
     public final static int ENCODER_RIGHT_A = 9;
     public final static int ENCODER_RIGHT_B = 8;
 
-    public static final double INCHES_PER_PULSE = ((3.66 / 5.14) * 6 * Math.PI)
-        / 256;
+    public static final double INCHES_PER_PULSE = ((3.66 / 5.14) * 6 * Math.PI) / 256;
 
     public static double kp = 0.013, ki = 0.000015, kd = -0.002;
     public static double gp = 0.018, gi = 0.000015, gd = 0;
@@ -95,32 +95,17 @@ public class Constants {
   }
 
   public static class Shooter {
-    public static final int PORT = 0;
-    public static final int PUNCH_FORWARD = 5;
-    public static final int PUNCH_REVERSE = 1;
-    public static final int ANGLE_ADJUSTER_PORT = 0;
-
-    public static final DoubleSolenoid.Value punch = DoubleSolenoid.Value.kForward;
-    public static final DoubleSolenoid.Value retract = DoubleSolenoid.Value.kReverse;
-
-    // Encoder port
-    public static final int ENCODER_PORT_A = 0;
-    public static final int ENCODER_PORT_B = 0;
-    public static final int RIGHT_HOOD_FORWARD = 2;
-    public static final int RIGHT_HOOD_REVERSE = 4;
-    public static final int LEFT_HOOD_FORWARD = 4;
-    public static final int LEFT_HOOD_REVERSE = 2;
-
-    public static final double DEFAULT_SHOOTER_SPEED = 0.5;
-
-    public static final Value open = Value.kReverse;
-    public static final Value closed = Value.kForward;
-
-    public static final Port LIDAR_I2C_PORT = I2C.Port.kMXP;
-
-    public static enum State {
-      RUNNING, STOPPED;
-    }
+    public static final int CATAPULT1_MODULE = PCM_MODULE_A;
+    public static final int CATAPULT1_FORWARD = 0;
+    public static final int CATAPULT1_REVERSE = 1;
+    public static final int CATAPULT2_MODULE = PCM_MODULE_B;
+    public static final int CATAPULT2_FORWARD = 2;
+    public static final int CATAPULT2_REVERSE = 3;// TODO Determine actual
+                                                  // shooter ports
+
+    public static final Value shoot = Value.kForward;
+    public static final Value reset = Value.kReverse;
+    public static final double WAIT_TIME = 2.0; // In seconds
   }
 
   public static class IntakeArm {
index aa58ffccde0c62a84520a6426eeaf1a3154be266..3eb1c1f5ebac159a2962441f99f077d1726fc56a 100644 (file)
@@ -14,7 +14,6 @@ import org.usfirst.frc.team3501.robot.commands.scaler.RunWinchContinuous;
 import org.usfirst.frc.team3501.robot.commands.scaler.StopWinch;
 import org.usfirst.frc.team3501.robot.commands.scaler.ToggleScaling;
 import org.usfirst.frc.team3501.robot.commands.shooter.Shoot;
-import org.usfirst.frc.team3501.robot.commands.shooter.runShooter;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
 
 import edu.wpi.first.wpilibj.DigitalInput;
@@ -57,50 +56,48 @@ public class OI {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
 
-    passPortcullis = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_PORTCULLIS_PORT));
+    passPortcullis = new DigitalButton(new DigitalInput(
+        Constants.OI.PASS_PORTCULLIS_PORT));
     passPortcullis.whenPressed(new PassPortcullis());
 
-    passChevalDeFrise = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_CHEVAL_DE_FRISE_PORT));
+    passChevalDeFrise = new DigitalButton(new DigitalInput(
+        Constants.OI.PASS_CHEVAL_DE_FRISE_PORT));
     passChevalDeFrise.whenPressed(new PassChevalDeFrise());
 
-    passDrawbridge = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_DRAWBRIDGE_PORT));
+    passDrawbridge = new DigitalButton(new DigitalInput(
+        Constants.OI.PASS_DRAWBRIDGE_PORT));
     passDrawbridge.whenPressed(new PassDrawBridge());
 
-    passSallyPort = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_SALLYPORT_PORT));
+    passSallyPort = new DigitalButton(new DigitalInput(
+        Constants.OI.PASS_SALLYPORT_PORT));
     passSallyPort.whenPressed(new PassSallyPort());
 
-    lowerChevalDeFrise = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_ONE_PORT));
+    lowerChevalDeFrise = new DigitalButton(new DigitalInput(
+        Constants.OI.ARCADE_INTAKEARM_LEVEL_ONE_PORT));
     lowerChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
         IntakeArm.potAngles[0], IntakeArm.moveIntakeArmSpeed));
 
-    moveToIntakeBoulder = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_TWO_PORT));
+    moveToIntakeBoulder = new DigitalButton(new DigitalInput(
+        Constants.OI.ARCADE_INTAKEARM_LEVEL_TWO_PORT));
     moveToIntakeBoulder.whenPressed(new MoveIntakeArmToAngle(
         IntakeArm.potAngles[1], IntakeArm.moveIntakeArmSpeed));
 
-    poiseAboveChevalDeFrise = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_THREE_PORT));
+    poiseAboveChevalDeFrise = new DigitalButton(new DigitalInput(
+        Constants.OI.ARCADE_INTAKEARM_LEVEL_THREE_PORT));
     poiseAboveChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
         IntakeArm.potAngles[2], IntakeArm.moveIntakeArmSpeed));
 
-    moveIntakeArmInsideRobot = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_FOUR_PORT));
+    moveIntakeArmInsideRobot = new DigitalButton(new DigitalInput(
+        Constants.OI.ARCADE_INTAKEARM_LEVEL_FOUR_PORT));
     moveIntakeArmInsideRobot.whenPressed(new MoveIntakeArmToAngle(
         IntakeArm.potAngles[3], IntakeArm.moveIntakeArmSpeed));
 
     toggleShooter = new JoystickButton(leftJoystick,
         Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
-    SpinRobot180_1 = new JoystickButton(leftJoystick,
-        Constants.OI.SPIN1_PORT);
+    SpinRobot180_1 = new JoystickButton(leftJoystick, Constants.OI.SPIN1_PORT);
     SpinRobot180_1.whenPressed(new Turn180());
 
-    SpinRobot180_2 = new JoystickButton(leftJoystick,
-        Constants.OI.SPIN2_PORT);
+    SpinRobot180_2 = new JoystickButton(leftJoystick, Constants.OI.SPIN2_PORT);
     SpinRobot180_2.whenPressed(new Turn180());
 
     compactRobot_1 = new JoystickButton(leftJoystick,
@@ -113,12 +110,11 @@ public class OI {
     shootBoulder = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_THUMB_PORT);
 
-    toggleScaling = new DigitalButton(
-        new DigitalInput(Constants.OI.TOGGLE_SCALING_PORT));
+    toggleScaling = new DigitalButton(new DigitalInput(
+        Constants.OI.TOGGLE_SCALING_PORT));
     toggleScaling.whenPressed(new ToggleScaling());
 
     if (!Constants.Scaler.SCALING) {
-      toggleShooter.toggleWhenPressed(new runShooter());
       compactRobot_1.whenPressed(new CompactRobot());
       compactRobot_2.whenPressed(new CompactRobot());
 
index 80d786762994a72067d56a36d2d4c8ce7d1cb29e..473ceea020e60b41df523807c6cbcccac22a0fb2 100644 (file)
@@ -1,6 +1,7 @@
 package org.usfirst.frc.team3501.robot;
 
 import org.usfirst.frc.team3501.robot.Constants.Defense;
+import org.usfirst.frc.team3501.robot.commands.shooter.ResetCatapult;
 import org.usfirst.frc.team3501.robot.subsystems.DefenseArm;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
@@ -85,15 +86,15 @@ public class Robot extends IterativeRobot {
     SmartDashboard.putData("Position Two Defense Chooser", positionTwoDefense);
     SmartDashboard.putData("Position Three Defense Chooser",
         positionThreeDefense);
-    SmartDashboard.putData("Position Four Defense Chooser",
-        positionFourDefense);
-    SmartDashboard.putData("Position Five Defense Chooser",
-        positionFiveDefense);
+    SmartDashboard
+        .putData("Position Four Defense Chooser", positionFourDefense);
+    SmartDashboard
+        .putData("Position Five Defense Chooser", positionFiveDefense);
 
-    SmartDashboard.putData("Position Four Defense Chooser",
-        positionFourDefense);
-    SmartDashboard.putData("Position Five Defense Chooser",
-        positionFiveDefense);
+    SmartDashboard
+        .putData("Position Four Defense Chooser", positionFourDefense);
+    SmartDashboard
+        .putData("Position Five Defense Chooser", positionFiveDefense);
 
     shooter = new Shooter();
 
@@ -129,6 +130,8 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
+    Scheduler.getInstance().add(new ResetCatapult()); // Reset catapult at start
+                                                      // of each match.
   }
 
   @Override
index 1dac8a77d9b81c560d1107d70862f94732e0029e..7e3ba9dcc54fa88326beb4834c368d95652a37e4 100644 (file)
@@ -1,6 +1,5 @@
 package org.usfirst.frc.team3501.robot.commands.auton;
 
-import org.usfirst.frc.team3501.robot.Robot;
 import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArmToAngle;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
 
@@ -14,6 +13,5 @@ public class CompactRobot extends CommandGroup {
   public CompactRobot() {
     addSequential(new MoveIntakeArmToAngle(IntakeArm.potAngles[3],
         IntakeArm.moveIntakeArmSpeed));
-    Robot.shooter.lowerHood();
   }
 }
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/ChangeShooterSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/ChangeShooterSpeed.java
deleted file mode 100644 (file)
index 186f797..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands.shooter;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-public class ChangeShooterSpeed extends Command {
-  double change = 0;
-
-  public ChangeShooterSpeed(double change) {
-    this.change = change;
-  }
-
-  @Override
-  protected void initialize() {
-    Robot.shooter.changeSpeed(change);
-  }
-
-  @Override
-  protected void execute() {
-
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return true;
-  }
-
-  @Override
-  protected void end() {
-
-  }
-
-  @Override
-  protected void interrupted() {
-  }
-
-}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/ExtendPunch.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/ExtendPunch.java
deleted file mode 100644 (file)
index a3cb813..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands.shooter;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-public class ExtendPunch extends Command {
-
-  @Override
-  protected void initialize() {
-    Robot.shooter.extendPunch();
-  }
-
-  @Override
-  protected void execute() {
-
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return true;
-  }
-
-  @Override
-  protected void end() {
-
-  }
-
-  @Override
-  protected void interrupted() {
-
-  }
-
-}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/FireCatapult.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/FireCatapult.java
new file mode 100644 (file)
index 0000000..065f25a
--- /dev/null
@@ -0,0 +1,38 @@
+package org.usfirst.frc.team3501.robot.commands.shooter;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+public class FireCatapult extends Command {
+
+  public FireCatapult() {
+    requires(Robot.shooter);
+  }
+
+  @Override
+  protected void initialize() {
+    Robot.shooter.fireCatapult();
+  }
+
+  @Override
+  protected void execute() {
+
+  }
+
+  @Override
+  protected boolean isFinished() {
+    return true;
+  }
+
+  @Override
+  protected void end() {
+
+  }
+
+  @Override
+  protected void interrupted() {
+
+  }
+
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java
new file mode 100644 (file)
index 0000000..ecdfce6
--- /dev/null
@@ -0,0 +1,38 @@
+package org.usfirst.frc.team3501.robot.commands.shooter;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+public class ResetCatapult extends Command {
+
+  public ResetCatapult() {
+    requires(Robot.shooter);
+  }
+
+  @Override
+  protected void initialize() {
+    Robot.shooter.resetCatapult();
+  }
+
+  @Override
+  protected void execute() {
+
+  }
+
+  @Override
+  protected boolean isFinished() {
+    return true;
+  }
+
+  @Override
+  protected void end() {
+
+  }
+
+  @Override
+  protected void interrupted() {
+
+  }
+
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/RetractPunch.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/RetractPunch.java
deleted file mode 100644 (file)
index c977a2e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands.shooter;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-public class RetractPunch extends Command {
-
-  @Override
-  protected void initialize() {
-    Robot.shooter.retractPunch();
-  }
-
-  @Override
-  protected void execute() {
-
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return true;
-  }
-
-  @Override
-  protected void end() {
-
-  }
-
-  @Override
-  protected void interrupted() {
-
-  }
-
-}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/SetShooterSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/SetShooterSpeed.java
deleted file mode 100644 (file)
index 6dce500..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands.shooter;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-public class SetShooterSpeed extends Command {
-  double speed = 0.0;
-
-  public SetShooterSpeed(double speed) {
-    this.speed = speed;
-  }
-
-  @Override
-  protected void initialize() {
-    Robot.shooter.setSpeed(speed);
-  }
-
-  @Override
-  protected void execute() {
-
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return true;
-  }
-
-  @Override
-  protected void end() {
-
-  }
-
-  @Override
-  protected void interrupted() {
-
-  }
-
-}
index 31fb261e576f0a9748769a1bfa7dd3d5f94b1aee..0b80c1d9c349f7d8b0ddcde6d0bd936e2f632f26 100755 (executable)
@@ -1,5 +1,6 @@
 package org.usfirst.frc.team3501.robot.commands.shooter;
 
+import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.command.CommandGroup;
@@ -9,21 +10,24 @@ public class Shoot extends CommandGroup {
 
   public boolean usePhotogate;
 
+  /**
+   * Fires catapult, then resets after a pause. If robot is set to use photogate
+   * and no ball is detected, nothing happens.
+   * 
+   * Precondition: catapult is in reset position, and ball is loaded in
+   * catapult.
+   */
   public Shoot() {
-    addSequential(new WaitCommand(3.0));
-    addSequential(new runShooter());
-    addSequential(new WaitCommand(3.0));
     if (Robot.shooter.usePhotogate()) {
       if (Robot.shooter.isBallInside()) {
-        addSequential(new ExtendPunch());
-        addSequential(new WaitCommand(5.0));
-        addSequential(new RetractPunch());
+        addSequential(new FireCatapult());
+        addSequential(new WaitCommand(Constants.Shooter.WAIT_TIME));
+        addSequential(new ResetCatapult());
       }
     } else {
-      addSequential(new ExtendPunch());
-      addSequential(new WaitCommand(5.0));
-      addSequential(new RetractPunch());
+      addSequential(new FireCatapult());
+      addSequential(new WaitCommand(Constants.Shooter.WAIT_TIME));
+      addSequential(new ResetCatapult());
     }
-
   }
 }
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java
deleted file mode 100644 (file)
index b4e8057..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands.shooter;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-/**
- *
- */
-public class runShooter extends Command {
-
-  public runShooter() {
-
-  }
-
-  // default shooter speed is used to shoot when in front of the batter
-  @Override
-  protected void initialize() {
-    Robot.shooter.setSpeed(0.5);
-  }
-
-  @Override
-  protected void execute() {
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return true;
-  }
-
-  @Override
-  protected void end() {
-    Robot.shooter.stop();
-  }
-
-  @Override
-  protected void interrupted() {
-  }
-}
index 7b6ef174bd3cc046ade23a65c00695c7a99862cd..8649045aa2d8119e5ff9a173ed1030d7d96a74b7 100755 (executable)
@@ -1,13 +1,9 @@
 package org.usfirst.frc.team3501.robot.subsystems;
 
 import org.usfirst.frc.team3501.robot.Constants;
-import org.usfirst.frc.team3501.robot.sensors.Lidar;
 import org.usfirst.frc.team3501.robot.sensors.Photogate;
 
-import edu.wpi.first.wpilibj.CANTalon;
-import edu.wpi.first.wpilibj.CounterBase.EncodingType;
 import edu.wpi.first.wpilibj.DoubleSolenoid;
-import edu.wpi.first.wpilibj.Encoder;
 import edu.wpi.first.wpilibj.command.Subsystem;
 
 /***
@@ -15,109 +11,50 @@ import edu.wpi.first.wpilibj.command.Subsystem;
  * motors. The piston controlling the platform pushes the ball onto the wheel.
  * The wheel is controlled by a motor, which is running before the ball is
  * pushed onto the wheel. The spinning wheel propels the ball.
- *
+ * 
  * @author superuser
- *
+ * 
  */
 
 public class Shooter extends Subsystem {
-  private CANTalon shooter;
-  private DoubleSolenoid hood1, hood2, punch;
-  private Encoder encoder;
-  private Lidar lidar;
+  private DoubleSolenoid catapult1, catapult2;
   private Photogate photogate;
   private boolean usePhotoGate;
 
   public Shooter() {
-    shooter = new CANTalon(Constants.Shooter.PORT);
-    hood1 = new DoubleSolenoid(10, Constants.Shooter.RIGHT_HOOD_FORWARD,
-        Constants.Shooter.RIGHT_HOOD_REVERSE); // right
-    hood2 = new DoubleSolenoid(9, Constants.Shooter.LEFT_HOOD_FORWARD,
-        Constants.Shooter.LEFT_HOOD_REVERSE);// left
-    punch = new DoubleSolenoid(9, Constants.Shooter.PUNCH_FORWARD,
-        Constants.Shooter.PUNCH_REVERSE);
-
-    encoder = new Encoder(Constants.Shooter.ENCODER_PORT_A,
-        Constants.Shooter.ENCODER_PORT_B, false, EncodingType.k4X);
-    usePhotoGate = true;
+    catapult1 = new DoubleSolenoid(Constants.Shooter.CATAPULT1_MODULE,
+        Constants.Shooter.CATAPULT1_FORWARD,
+        Constants.Shooter.CATAPULT1_REVERSE);
+    catapult2 = new DoubleSolenoid(Constants.Shooter.CATAPULT2_MODULE,
+        Constants.Shooter.CATAPULT2_FORWARD,
+        Constants.Shooter.CATAPULT2_REVERSE);
+    usePhotoGate = false;
   }
 
   /***
    * This method checks to see if the ball has successfully passed through the
    * intake rollers and is inside.
-   *
+   * 
    * @return whether the presence of the ball is true or false and returns the
    *         state of the condition (true or false).
    */
 
   public boolean isBallInside() {
-
     if (usePhotogate())
       return photogate.isBallPresent();
     else
       return true;
-
-  }
-
-  public void setSpeed(double speed) {
-    if (speed > 1.0)
-      shooter.set(1.0);
-    else if (speed < -1.0)
-      shooter.set(-1.0);
-    else
-      shooter.set(speed);
   }
 
-  public void stop() {
-    this.setSpeed(0.0);
+  // Catapult Commands
+  public void fireCatapult() {
+    catapult1.set(Constants.Shooter.shoot);
+    catapult2.set(Constants.Shooter.shoot);
   }
 
-  public double getSpeed() {
-    return encoder.getRate();
-  }
-
-  /*
-   * We are going to map a lidar distance to a shooter speed that will be set to
-   * the shooter. This function does not yet exist so we will just use y=x but
-   * when testing commences we shall create the function
-   */
-  public double getShooterSpeed() {
-    double distanceToGoal = lidar.getDistance();
-    double shooterSpeed = distanceToGoal; // Function to be determined
-    return shooterSpeed;
-  }
-
-  // Use negative # for decrement. Positive for increment.
-
-  public void changeSpeed(double change) {
-    double newSpeed = getSpeed() + change;
-    setSpeed(newSpeed);
-  }
-
-  // Punch Commands
-  public void extendPunch() {
-    punch.set(Constants.Shooter.punch);
-  }
-
-  public void retractPunch() {
-    punch.set(Constants.Shooter.retract);
-  }
-
-  public void raiseHood() {
-    hood1.set(Constants.Shooter.open);
-    hood2.set(Constants.Shooter.open);
-  }
-
-  public void lowerHood() {
-    hood1.set(Constants.Shooter.closed);
-    hood2.set(Constants.Shooter.closed);
-  }
-
-  public boolean isHoodDown() {
-    if (hood1.get() == Constants.Shooter.open
-        && hood2.get() == Constants.Shooter.open)
-      return true;
-    return false;
+  public void resetCatapult() {
+    catapult1.set(Constants.Shooter.reset);
+    catapult2.set(Constants.Shooter.reset);
   }
 
   public boolean usePhotogate() {