Delete unneeded methods in Shooter
authorshainachen <shaina.sierra@gmail.com>
Sat, 14 Jan 2017 22:54:43 +0000 (14:54 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Wed, 25 Jan 2017 03:40:37 +0000 (19:40 -0800)
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java

index f22a1883f053dd557c78942dba6bc70bf207c414..06073a791795c2be6c7aeccb781042bbba045fce 100644 (file)
@@ -1,12 +1,25 @@
 package org.usfirst.frc.team3501.robot.subsystems;
 
-public class Shooter {
+import org.usfirst.frc.team3501.robot.Constants;
+
+import com.ctre.CANTalon;
+
+import edu.wpi.first.wpilibj.command.Subsystem;
+
+public class Shooter extends Subsystem {
   private static Shooter shooter;
+  private final CANTalon flyWheel, indexWheel;
 
   private Shooter() {
-
+    flyWheel = new CANTalon(Constants.Shooter.FLY_WHEEL);
+    indexWheel = new CANTalon(Constants.Shooter.INDEX_WHEEL);
   }
 
+  /**
+   * Returns shooter object
+   *
+   * @return Shooter object
+   */
   public static Shooter getShooter() {
     if (shooter == null) {
       shooter = new Shooter();
@@ -15,24 +28,41 @@ public class Shooter {
   }
 
   /**
-   * Stops fly wheel
+   * Sets fly wheel motor value to input.
+   *
+   * @param val
+   *          motor value from -1 to 1(fastest forward)
    */
-  public void stopFlywheel() {
-
+  public void setFlyWheelMotorVal(final double val) {
+    flyWheel.set(val);
   }
 
-  public void setFlyWheelMotorVal(final double val) {
+  /**
+   * Stops fly wheel motor.
+   */
+  public void stopFlyWheel() {
+    flyWheel.set(0);
+  }
 
+  /**
+   * Sets index wheel motor value to input.
+   *
+   * @param val
+   *          motor value from -1 to 1(fastest forward)
+   */
+  public void setIndexWheelMotorVal(final double val) {
+    indexWheel.set(val);
   }
 
   /**
-   * Stops index wheel
+   * Stops index wheel motor.
    */
   public void stopIndexWheel() {
-
+    indexWheel.set(0);
   }
 
-  public void setIndexWheelMotorVal(final double val) {
+  @Override
+  protected void initDefaultCommand() {
 
   }
 }