Change variable port name and use setSpeed method
authorEvanYap <evanyap.14@gmail.com>
Fri, 22 Jan 2016 02:53:15 +0000 (18:53 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:35 +0000 (19:37 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java

index 3d05b3f3638fc9c502da69b614273850f6d54c2e..73e5b85c4838ac66fdab3fe126f860a07c985f9b 100644 (file)
@@ -32,7 +32,7 @@ public class Constants {
   }
 
   public static class Shooter {
-    public static final int SHOOTER_WHEEL_PORT = 0;
+    public static final int PORT = 0;
   }
 
   public static enum Direction {
index 9e0263697261ab33a8fc022037200714ddf77026..51bccd2832413efef480bf029ec6fa9fe8d0365a 100755 (executable)
@@ -9,7 +9,7 @@ public class Shooter extends Subsystem {
   CANTalon shooter;\r
 \r
   public Shooter() {\r
-    shooter = new CANTalon(Constants.Shooter.SHOOTER_WHEEL_PORT);\r
+    shooter = new CANTalon(Constants.Shooter.PORT);\r
   }\r
 \r
   public double getCurrentSpeed() {\r
@@ -28,12 +28,11 @@ public class Shooter extends Subsystem {
       shooter.set(-1.0);\r
     else {\r
       double newSpeed = getCurrentSpeed() + change;\r
-      shooter.set(newSpeed);\r
+      setSpeed(newSpeed);\r
     }\r
   }\r
 \r
   @Override\r
   protected void initDefaultCommand() {\r
-\r
   }\r
 }\r