add second motor controller for shooter
authorCindy Zhang <cindyzyx9@gmail.com>
Fri, 10 Feb 2017 04:05:48 +0000 (20:05 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Fri, 10 Feb 2017 04:05:48 +0000 (20:05 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java

index 671de15e85b6e9d86dcc2f89872b5ec617b548fb..13e8b27989eaf0190fb260d9efd6be07a3bf026c 100644 (file)
@@ -27,7 +27,8 @@ public class Constants {
 
   public static class Shooter {
     // MOTOR CONTROLLERS
-    public static final int FLY_WHEEL = 0;
+    public static final int FLY_WHEEL1 = 0;
+    public static final int FLY_WHEEL2 = 0;
     public static final int INDEX_WHEEL = 0;
     public final static int TOGGLE_WINCH_PORT = 0;
 
index d786d22cf5120e6ff680d6c017256ba8c487bd44..0c58ba32bb7605bc5a5e0d8c6c1addd6aebcaf52 100644 (file)
@@ -11,7 +11,7 @@ public class Shooter extends Subsystem {
   public double wheelP = 0, wheelI = 0, wheelD = -0;
   private static Shooter shooter;
   private static HallEffectSensor hallEffect;
-  private final CANTalon flyWheel, indexWheel;
+  private final CANTalon flyWheel1, flyWheel2, indexWheel;
 
   public static final double DEFAULT_INDEXING_SPEED = 0;
   public static final double DEFAULT_SHOOTING_SPEED = 0;
@@ -20,7 +20,8 @@ public class Shooter extends Subsystem {
   public static final double SHOOTING_SPEED_INCREMENT = 0;
 
   private Shooter() {
-    flyWheel = new CANTalon(Constants.Shooter.FLY_WHEEL);
+    flyWheel1 = new CANTalon(Constants.Shooter.FLY_WHEEL1);
+    flyWheel2 = new CANTalon(Constants.Shooter.FLY_WHEEL2);
     indexWheel = new CANTalon(Constants.Shooter.INDEX_WHEEL);
 
     hallEffect = new HallEffectSensor(Constants.Shooter.HALL_EFFECT_PORT, 1);
@@ -49,14 +50,16 @@ public class Shooter extends Subsystem {
    *          motor value from -1 to 1(fastest forward)
    */
   public void setFlyWheelMotorVal(final double val) {
-    flyWheel.set(val);
+    flyWheel1.set(val);
+    flyWheel2.set(val);
   }
 
   /**
    * Stops fly wheel motor.
    */
   public void stopFlyWheel() {
-    flyWheel.set(0);
+    flyWheel1.set(0);
+    flyWheel2.set(0);
   }
 
   /**