add comments that explain what these commandgroups do
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / MoveDefenseArmVertical.java
1 package org.usfirst.frc.team3501.robot.commands;
2
3 import org.usfirst.frc.team3501.robot.Robot;
4
5 import edu.wpi.first.wpilibj.command.CommandGroup;
6
7 /**
8 * Given input verticalDisplacement, which represents how far (and in what
9 * direction, depending on the sign) the user wants the arm to be moved linearly
10 * & vertically, this commandGroup calls the MoveDefenseArm command, which
11 * will then move the tip of the arm to the target position based on input
12 * verticalDisplacement
13 */
14 public class MoveDefenseArmVertical extends CommandGroup {
15
16 public MoveDefenseArmVertical(double verticalDisplacement) {
17 double x = Robot.defenseArm.getArmHorizontalDisplacement();
18 double y = Robot.defenseArm.getArmVerticalDisplacement();
19 addSequential(new MoveDefenseArm(x, y + verticalDisplacement));
20
21 }
22 }