package org.usfirst.frc.team3501.robot.commandgroups;
+import org.usfirst.frc.team3501.robot.Constants.Direction;
import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
*
*/
public class BaselineWallAlign extends CommandGroup {
+ private static final String TEAM = "RED"; // set to either RED or BLUE team
public BaselineWallAlign() {
- addSequential(new DriveDistance(0, 0));
- addSequential(new TurnForAngle(0, LEFT, 0));
- addSequential(new DriveDistance(0, 0));
- addSequential(new TurnForAngle(0, LEFT, 0));
+ addSequential(new DriveDistance(10, -0));
+
+ if (TEAM.equals("RED")) {
+ addSequential(new TurnForAngle(115.91, Direction.RIGHT, 0));
+ addSequential(new DriveDistance(126.35, 0));
+ addSequential(new TurnForAngle(90, Direction.LEFT, 0));
+ } else {
+ addSequential(new TurnForAngle(115.91, Direction.LEFT, 0));
+ addSequential(new DriveDistance(117.15, 0));
+ addSequential(new TurnForAngle(90, Direction.RIGHT, 0));
+ }
addSequential(new PrepareToShoot());
}
package org.usfirst.frc.team3501.robot.commandgroups;
+import org.usfirst.frc.team3501.robot.Constants.Direction;
import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
*
*/
public class BoilerPegAlign extends CommandGroup {
+ private static final String TEAM = "RED"; // set to either RED or BLUE team
public BoilerPegAlign() {
- addSequential(new DriveDistance(0, 0));
- addSequential(new TurnForAngle(0, LEFT, 0));
- addSequential(new DriveDistance(0, 0));
- addSequential(new TurnForAngle(0, LEFT, 0));
- addSequential(new DriveDistance(0, 0));
+ addSequential(new DriveDistance(10, -0));
+ if (TEAM.equals("RED")) {
+ addSequential(new TurnForAngle(90, Direction.LEFT, 0));
+ addSequential(new DriveDistance(53.55, 0));
+ addSequential(new TurnForAngle(90, Direction.LEFT, 0));
+ } else {
+ addSequential(new TurnForAngle(90, Direction.RIGHT, 0));
+ addSequential(new DriveDistance(44.35, 0));
+ addSequential(new TurnForAngle(90, Direction.RIGHT, 0));
+ }
+ addSequential(new DriveDistance(58.31, 0));
addSequential(new PrepareToShoot());
}
package org.usfirst.frc.team3501.robot.commandgroups;
+import org.usfirst.frc.team3501.robot.Constants.Direction;
import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
*
*/
public class KeyAllianceWallAlign extends CommandGroup {
+ private static final String TEAM = "RED"; // set to either RED or BLUE team
public KeyAllianceWallAlign() {
- addSequential(new TurnForAngle(0, LEFT, 0));
- addSequential(new DriveDistance(0, 0));
+ if (TEAM.equals("RED")) {
+ addSequential(new TurnForAngle(45, Direction.RIGHT, 0));
+ addSequential(new DriveDistance(77.6, 0));
+ addSequential(new TurnForAngle(90, Direction.RIGHT, 0));
+ } else {
+ addSequential(new TurnForAngle(45, Direction.LEFT, 0));
+ addSequential(new DriveDistance(68.4, 0));
+ addSequential(new TurnForAngle(90, Direction.LEFT, 0));
+ }
addSequential(new PrepareToShoot());
}
}
package org.usfirst.frc.team3501.robot.commandgroups;
+import org.usfirst.frc.team3501.robot.Constants.Direction;
import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
*
*/
public class MiddlePegAlign extends CommandGroup {
+ private static final String TEAM = "RED"; // set to either RED or BLUE team
public MiddlePegAlign() {
- addSequential(new DriveDistance(0, 0));
- addSequential(new TurnForAngle(0, LEFT, 0));
- addSequential(new DriveDistance(0, 0));
+ addSequential(new DriveDistance(14.6, -0));
+ if (TEAM.equals("RED")) {
+ addSequential(new TurnForAngle(121.75, Direction.RIGHT, 0));
+ } else {
+ addSequential(new TurnForAngle(121.75, Direction.LEFT, 0));
+ }
+ addSequential(new DriveDistance(190.5, 0));
addSequential(new PrepareToShoot());
}
}