delete second potentiometer for defense hand
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / DefenseArm.java
index b9fd25bc275f9127070a5904aa2f1c5fdb5af827..8e49508981cc1bc5d7a2444787b567b421758b5f 100755 (executable)
@@ -12,6 +12,7 @@ public class DefenseArm extends Subsystem {
   public AnalogPotentiometer defenseHandPotentiometer;\r
   public CANTalon defenseArmMotor;\r
   public CANTalon defenseHandMotor;\r
+  public double hookHeight;\r
 \r
   // Defense arm specific constants that relate to the degrees per pulse value\r
   // for the potentiometers\r
@@ -19,6 +20,7 @@ public class DefenseArm extends Subsystem {
   public final static double FULL_RANGE = 270.0; // in degrees\r
   public final static double OFFSET = -135.0; // in degrees\r
   public final static double[] armPotValue = { 0.0, 45.0, 90.0 }; // 3 level\r
+\r
   // array;\r
 \r
   // do we want to use a hashmap??\r
@@ -29,12 +31,24 @@ public class DefenseArm extends Subsystem {
     defenseArmPotentiometer = new AnalogPotentiometer(\r
         Constants.DefenseArm.ARM_CHANNEL,\r
         FULL_RANGE, OFFSET);\r
-    defenseHandPotentiometer = new AnalogPotentiometer(\r
-        Constants.DefenseArm.HAND_CHANNEL);\r
+    Constants.DefenseArm.HAND_CHANNEL);\r
     defenseArmMotor = new CANTalon(Constants.DefenseArm.ARM_PORT);\r
     defenseHandMotor = new CANTalon(Constants.DefenseArm.HAND_PORT);\r
   }\r
 \r
+  /***\r
+   * This method gets the height of the hook from the ground. The hook is\r
+   * attached to the end of the hand, which is attached to the arm.\r
+   * \r
+   * @return hookHeight gets height of hook from ground. The hook is attached to\r
+   *         the end of the hand, which is attached the arm.\r
+   * \r
+   */\r
+\r
+  public double getHookHeight() {\r
+    return hookHeight;\r
+  }\r
+\r
   @Override\r
   protected void initDefaultCommand() {\r
   }\r