- public double getDistance(int desiredArmLocation) {
- return potAngles[desiredArmLocation];
- }
-
- public Double[] putInValues() {
- for (int i = 0; i < 3; i++) {
- potAngles[i] = (double) (45 * i);
- }
- return potAngles;
+ /***
+ * This method takes an arm location as input (range of [0,2])
+ * Returns the angle of the arm corresponding to that arm location
+ *
+ * @param desiredArmLocation
+ * takes an arm location ranging from [0,2]
+ * 0 is the lowest position of arm
+ * 2 is the highest position of arm
+ * @return
+ * the angle of the arm corresponding to that arm location
+ */
+ public double getLevelValue(int level) {
+ if (level >= potAngles.length)
+ return potAngles[level];
+ else
+ return 0;