Add getArmHeight to MoveIntakeArmToBallIntakeHeight
authorShivani Oghanta <shivani.oghanta@gmail.com>
Sun, 7 Feb 2016 02:32:29 +0000 (18:32 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Sat, 13 Feb 2016 19:52:19 +0000 (11:52 -0800)
src/org/usfirst/frc/team3501/robot/commands/MoveIntakeArmToBallIntakeHeight.java

index deda77b4e5b287587c9cf15efaa0809577a232cf..c33ee62da294c130a85f54d78631d8c1e8107525 100644 (file)
@@ -19,7 +19,7 @@ public class MoveIntakeArmToBallIntakeHeight extends Command {
 
        @Override
        protected void initialize() {
-               currentHeight = Robot.intakeArm.getArmAngle();
+               currentHeight = Robot.intakeArm.getArmHeight();
                double difference = targetHeight - currentHeight;
                if (difference > 0) {
                        Robot.intakeArm.setArmVoltage(targetSpeed);
@@ -35,7 +35,7 @@ public class MoveIntakeArmToBallIntakeHeight extends Command {
 
        @Override
        protected boolean isFinished() {
-               currentHeight = Robot.intakeArm.getArmAngle();
+               currentHeight = Robot.intakeArm.getArmHeight();
                double distance = Math.abs(currentHeight - targetHeight);
                if (distance <= SENSITIVITY_THRESHOLD) {
                        return true;