+<<<<<<< 41a8c498b73f7772d992078cea69ee5673d70668
package org.usfirst.frc.team3501.robot.subsystems;
import org.usfirst.frc.team3501.robot.Constants;
protected void initDefaultCommand() {
}
}
+=======
+package org.usfirst.frc.team3501.robot.subsystems;
+
+import org.usfirst.frc.team3501.robot.Constants;
+
+import edu.wpi.first.wpilibj.AnalogPotentiometer;
+import edu.wpi.first.wpilibj.CANTalon;
+import edu.wpi.first.wpilibj.command.Subsystem;
+
+public class DefenseArm extends Subsystem {
+ // Defense arm related objects
+ public AnalogPotentiometer defenseArmPotentiometer;
+ public CANTalon defenseArmMotor;
+ public CANTalon defenseHandMotor;
+ public double hookHeight;
+ public double footHeight;
+
+ // Defense arm specific constants that relate to the degrees per pulse value
+ // for the potentiometers
+ // private final static double PULSES_PER_ROTATION = 1; // in pulses
+ public final static double FULL_RANGE = 270.0; // in degrees
+ public final static double OFFSET = -135.0; // in degrees
+ public final static double[] armPotValue = { 0.0, 45.0, 90.0 }; // 3 level
+
+ // array;
+
+ // do we want to use a hashmap??
+ // angles at 0,45,90 (Potentiometer value readings)
+ // degrees
+
+ public DefenseArm() {
+ defenseArmPotentiometer = new AnalogPotentiometer(
+ Constants.DefenseArm.ARM_CHANNEL, FULL_RANGE, OFFSET);
+
+ defenseArmMotor = new CANTalon(Constants.DefenseArm.ARM_PORT);
+ defenseHandMotor = new CANTalon(Constants.DefenseArm.HAND_PORT);
+ }
+
+ /***
+ * <<<<<<< Updated upstream This method gets the height of the hook from the
+ * ground. The hook is attached to the end of the hand, which is attached to
+ * the arm.
+ *
+ * @return hookHeight gets height of hook from ground. The hook is attached to
+ * the end of the hand, which is attached the arm. The height is in
+ * inches.
+ *
+ */
+
+ public double getHookHeight() {
+
+ return hookHeight;
+ }
+
+ /***
+ * This method gets the height of the foot from the ground. The foot is
+ * attached to the end of the hand, which is attached to the arm.
+ *
+ * @return footHeight gets height of foot from ground. The foot is attached to
+ * the end of the hand, which is attached the arm. The height is in
+ * inches.
+ *
+ */
+
+ public double getFootHeight() {
+
+ return footHeight;
+
+ }
+
+ @Override
+ protected void initDefaultCommand() {
+ }
+}
+>>>>>>> write methods getArmAngle and getHandAngle