From fa9e81daf4f2b1bced6367915be0cf4d2beb1f55 Mon Sep 17 00:00:00 2001 From: nbhargava Date: Mon, 16 Nov 2015 21:11:29 -0800 Subject: [PATCH] Added variables for parameters in potentiometer constructor --- src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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() { -- 2.30.2