From e92341630f4cad7ac31214aee906f7221d9f1f38 Mon Sep 17 00:00:00 2001 From: EvanYap Date: Thu, 21 Jan 2016 18:53:15 -0800 Subject: [PATCH] Change variable port name and use setSpeed method --- src/org/usfirst/frc/team3501/robot/Constants.java | 2 +- src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index 3d05b3f3..73e5b85c 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -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 { diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index 9e026369..51bccd28 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -9,7 +9,7 @@ public class Shooter extends Subsystem { CANTalon shooter; public Shooter() { - shooter = new CANTalon(Constants.Shooter.SHOOTER_WHEEL_PORT); + shooter = new CANTalon(Constants.Shooter.PORT); } public double getCurrentSpeed() { @@ -28,12 +28,11 @@ public class Shooter extends Subsystem { shooter.set(-1.0); else { double newSpeed = getCurrentSpeed() + change; - shooter.set(newSpeed); + setSpeed(newSpeed); } } @Override protected void initDefaultCommand() { - } } -- 2.30.2