From 4927eb6c0589cc732846c8757c1e6ea6a98effd1 Mon Sep 17 00:00:00 2001 From: Cindy Zhang Date: Thu, 11 Feb 2016 19:33:22 -0800 Subject: [PATCH] change method getArmHorizontalDist to getArmHorizontalDisplacement --- notes/cindy.org | 7 +++---- .../usfirst/frc/team3501/robot/subsystems/DefenseArm.java | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/notes/cindy.org b/notes/cindy.org index 8464b6f4..09b35857 100644 --- a/notes/cindy.org +++ b/notes/cindy.org @@ -3,15 +3,14 @@ relative to that * find out actual arm and hand length, as well as the height at which the arm is mounted - * change arm and hand to "armHorizontal/armVertical" and "handHorizontal/ - handVertical" * change method "getArmHorizontalDist" to "getArmHorizontalDisplacement" * change method "getArmHeight" to "getArmVerticalDisplacement" * for getArmHorizontalDisplacement figure out if measurements are all in inches * doing - * change arm and hand to "armHorizontal/armVertical" and "handHorizontal/ - handVertical" + * change method "getArmHorizontalDist" to "getArmHorizontalDisplacement" * done * code review + * change arm and hand to "armHorizontal/armVertical" and "handHorizontal/ + handVertical" \ No newline at end of file diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java index 93dfc0ba..020d51b3 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java @@ -96,7 +96,7 @@ public class DefenseArm extends Subsystem { } // TODO: figure out if measurements are all in inches - public double getArmHorizontalDist() { + public double getArmHorizontalDisplacement() { double armHorizontalDisplacement = Constants.DefenseArm.ARM_LENGTH * Math.cos(getArmPotAngle()); double handHorizontalDisplacement = Constants.DefenseArm.HAND_LENGTH @@ -114,7 +114,7 @@ public class DefenseArm extends Subsystem { } public boolean isOutsideRange() { - if (getArmHorizontalDist() < 15) + if (getArmHorizontalDisplacement() < 15) return false; return true; } -- 2.30.2