add comments that explain what these commandgroups do
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / MoveDefenseArmVertical.java
index 73db39c47b791beacd1c8d147d8fce46a3f09f7d..61edfcfbdfd9c0d9fb2401b625272034c9d56873 100644 (file)
@@ -1,13 +1,22 @@
 package org.usfirst.frc.team3501.robot.commands;
 
+import org.usfirst.frc.team3501.robot.Robot;
+
 import edu.wpi.first.wpilibj.command.CommandGroup;
 
 /**
- *
+ * Given input verticalDisplacement, which represents how far (and in what
+ * direction, depending on the sign) the user wants the arm to be moved linearly
+ * & vertically, this commandGroup calls the MoveDefenseArm command, which
+ * will then move the tip of the arm to the target position based on input
+ * verticalDisplacement
  */
 public class MoveDefenseArmVertical extends CommandGroup {
 
-  public MoveDefenseArmVertical(double x, double y, double verticalDisplacement) {
+  public MoveDefenseArmVertical(double verticalDisplacement) {
+    double x = Robot.defenseArm.getArmHorizontalDisplacement();
+    double y = Robot.defenseArm.getArmVerticalDisplacement();
     addSequential(new MoveDefenseArm(x, y + verticalDisplacement));
+
   }
 }