fix command names and get rid of unused stuff
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / Shooter.java
index 9c56a07a3021c55816f59cf6e2f58762f19a15a4..0264c7578e5f34afb6ce0bdfea7abaab0a36fdec 100755 (executable)
@@ -1,6 +1,7 @@
 package org.usfirst.frc.team3501.robot.subsystems;
 
 import org.usfirst.frc.team3501.robot.Constants;
+import org.usfirst.frc.team3501.robot.Lidar;
 
 import edu.wpi.first.wpilibj.CANTalon;
 import edu.wpi.first.wpilibj.CounterBase.EncodingType;
@@ -9,10 +10,10 @@ import edu.wpi.first.wpilibj.Encoder;
 import edu.wpi.first.wpilibj.command.Subsystem;
 
 /***
- * The Shooter consists of a platform and wheel, each controlled by
- * separate motors. The motor controlling the platform pushes the ball onto the
- * wheel. The wheel is controlled by a motor, which runs once the ball is pushed
- * onto the wheel. The spinning wheel propels the ball.
+ * The Shooter consists of a platform and wheel, each controlled by separate
+ * 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
  *
@@ -21,27 +22,20 @@ import edu.wpi.first.wpilibj.command.Subsystem;
 public class Shooter extends Subsystem {
   private CANTalon shooter;
   private CANTalon angleAdjuster;
-  private DoubleSolenoid punch;
+  private DoubleSolenoid hood, punch;
   private Encoder encoder;
+  private Lidar lidar;
 
   public Shooter() {
     shooter = new CANTalon(Constants.Shooter.PORT);
     angleAdjuster = new CANTalon(Constants.Shooter.ANGLE_ADJUSTER_PORT);
-    punch = new DoubleSolenoid(Constants.Shooter.PUNCH_FORWARD_PORT,
-        Constants.Shooter.PUNCH_REVERSE_PORT);
+    punch = new DoubleSolenoid(Constants.Shooter.PUNCH_FORWARD,
+        Constants.Shooter.PUNCH_REVERSE);
 
     encoder = new Encoder(Constants.Shooter.ENCODER_PORT_A,
         Constants.Shooter.ENCODER_PORT_B, false, EncodingType.k4X);
   }
 
-  /***
-   *
-   * @return current sensor position??
-   */
-  public double getCurrentSetPoint() {
-    return shooter.get();
-  }
-
   /***
    * This method checks to see if the ball has successfully passed through the
    * intake rollers and is inside.
@@ -74,7 +68,7 @@ public class Shooter extends Subsystem {
   // Use negative # for decrement. Positive for increment.
 
   public void changeSpeed(double change) {
-    double newSpeed = getCurrentSetPoint() + change;
+    double newSpeed = getSpeed() + change;
     setSpeed(newSpeed);
   }