From: nbhargava Date: Tue, 17 Nov 2015 05:11:29 +0000 (-0800) Subject: Added variables for parameters in potentiometer constructor X-Git-Url: http://challenge-bot.com/repos/?a=commitdiff_plain;h=fa9e81daf4f2b1bced6367915be0cf4d2beb1f55;p=3501%2F2015-FRC-Spark Added variables for parameters in potentiometer constructor --- diff --git a/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java b/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java index a17a635..c425370 100644 --- a/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java +++ b/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java @@ -10,13 +10,14 @@ import edu.wpi.first.wpilibj.command.Subsystem; public class Arm extends Subsystem { private CANJaguar left, right; public AnalogPotentiometer analogPotentiometer; - + static final double ANGLE_RANGE = 360; + static final double INITIAL_ANGLE = 30; public Arm() { left = new CANJaguar(RobotMap.ARM_LEFT); right = new CANJaguar(RobotMap.ARM_RIGHT); - AnalogInput ai = new AnalogInput(1); - analogPotentiometer = new AnalogPotentiometer(ai, 360, 30); + AnalogInput analogInput = new AnalogInput(1); + analogPotentiometer = new AnalogPotentiometer(analogInput, ANGLE_RANGE, INITIAL_ANGLE); } public void initDefaultCommand() {