Finished autoalignment code
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commandgroups / BaselineWallAlign.java
1 package org.usfirst.frc.team3501.robot.commandgroups;
2
3 import org.usfirst.frc.team3501.robot.Constants.Direction;
4 import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
5 import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
6
7 import edu.wpi.first.wpilibj.command.CommandGroup;
8
9 /**
10 *
11 */
12 public class BaselineWallAlign extends CommandGroup {
13 private static final String TEAM = "RED"; // set to either RED or BLUE team
14
15 public BaselineWallAlign() {
16 addSequential(new DriveDistance(10, -0));
17
18 if (TEAM.equals("RED")) {
19 addSequential(new TurnForAngle(115.91, Direction.RIGHT, 0));
20 addSequential(new DriveDistance(126.35, 0));
21 addSequential(new TurnForAngle(90, Direction.LEFT, 0));
22 } else {
23 addSequential(new TurnForAngle(115.91, Direction.LEFT, 0));
24 addSequential(new DriveDistance(117.15, 0));
25 addSequential(new TurnForAngle(90, Direction.RIGHT, 0));
26 }
27 addSequential(new PrepareToShoot());
28
29 }
30 }