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));
+
}
}