X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommandgroups%2FAutonSideGear.java;h=70f7226857e3ef835dbdc1396ee8f4c7de3d8959;hp=386dfe598711dc7a2c8456e9cb869f80ea3035bb;hb=9ca89e45fa84b2ec93bc6adf60c7dde1e0a7defb;hpb=c9b2778700c8f0bd6dec88e9993e176823145308 diff --git a/src/org/usfirst/frc/team3501/robot/commandgroups/AutonSideGear.java b/src/org/usfirst/frc/team3501/robot/commandgroups/AutonSideGear.java index 386dfe5..70f7226 100644 --- a/src/org/usfirst/frc/team3501/robot/commandgroups/AutonSideGear.java +++ b/src/org/usfirst/frc/team3501/robot/commandgroups/AutonSideGear.java @@ -34,7 +34,7 @@ public class AutonSideGear extends CommandGroup { * inches and 205.7286 inches from the right side of the arena this program * chooses which peg to go for based on the starting point */ - public AutonSideGear(String side) { + public AutonSideGear(String team, String side) { requires(Robot.getDriveTrain()); if (side.equals("BOILER")) { @@ -42,7 +42,12 @@ public class AutonSideGear extends CommandGroup { 131.6 - (94.88 - ROBOT_WIDTH / 2 - distanceFromCorner) / Math.sqrt(3) - ROBOT_LENGTH / 2, 5)); - addSequential(new TurnForAngle(60, Direction.RIGHT, 5)); + + if (team.equals("RED")) + addSequential(new TurnForAngle(60, Direction.LEFT, 5)); + else if (team.equals("BLUE")) + addSequential(new TurnForAngle(60, Direction.RIGHT, 5)); + addSequential(new DriveDistance( 2 * (94.88 - ROBOT_WIDTH / 2 - distanceFromCorner) / Math.sqrt(3) - ROBOT_LENGTH / 2 + 7, @@ -52,7 +57,12 @@ public class AutonSideGear extends CommandGroup { 131.6 - (93.13 - ROBOT_WIDTH / 2 - distanceFromCorner) / Math.sqrt(3) - ROBOT_LENGTH / 2, 5)); - addSequential(new TurnForAngle(60, Direction.LEFT, 5)); + + if (team.equals("RED")) + addSequential(new TurnForAngle(60, Direction.RIGHT, 5)); + else if (team.equals("BLUE")) + addSequential(new TurnForAngle(60, Direction.LEFT, 5)); + addSequential(new DriveDistance( 2 * (93.13 - ROBOT_WIDTH / 2 - distanceFromCorner) / Math.sqrt(3) - ROBOT_LENGTH / 2,