X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FDefenseArm.java;h=8e49508981cc1bc5d7a2444787b567b421758b5f;hb=f661626fd47ad3fa3b6c744e84c6d0b4a4130857;hp=b9fd25bc275f9127070a5904aa2f1c5fdb5af827;hpb=1826a8dc87107766f95c8f93b9ac536d1d8b0fe4;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java index b9fd25bc..8e495089 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java @@ -12,6 +12,7 @@ public class DefenseArm extends Subsystem { public AnalogPotentiometer defenseHandPotentiometer; public CANTalon defenseArmMotor; public CANTalon defenseHandMotor; + public double hookHeight; // Defense arm specific constants that relate to the degrees per pulse value // for the potentiometers @@ -19,6 +20,7 @@ public class DefenseArm extends Subsystem { 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?? @@ -29,12 +31,24 @@ public class DefenseArm extends Subsystem { defenseArmPotentiometer = new AnalogPotentiometer( Constants.DefenseArm.ARM_CHANNEL, FULL_RANGE, OFFSET); - defenseHandPotentiometer = new AnalogPotentiometer( - Constants.DefenseArm.HAND_CHANNEL); + Constants.DefenseArm.HAND_CHANNEL); defenseArmMotor = new CANTalon(Constants.DefenseArm.ARM_PORT); defenseHandMotor = new CANTalon(Constants.DefenseArm.HAND_PORT); } + /*** + * 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. + * + */ + + public double getHookHeight() { + return hookHeight; + } + @Override protected void initDefaultCommand() { }