*
*/
public class AlignToScore extends CommandGroup {
+ private final double DEFAULT_SPEED = 0.5;
+ // constants for position 1: low bar
+
+ private final double POS1_DIST1 = 0;
+ private final double POS1_TURN1 = 0;
+ private final double POS1_DIST2 = 0;
+
+ // constants for position 2
+
+ private final double POS2_DIST1 = 0;
+ private final double POS2_TURN1 = 0;
+ private final double POS2_DIST2 = 0;
+
+ // constants for position 3
+ private final double POS3_DIST1 = 0;
+ private final double POS3_TURN1 = 0;
+ private final double POS3_DIST2 = 0;
+ private final double POS3_TURN2 = 0;
+ private final double POS3_DIST3 = 0;
+
+ // constants for position 4
+
+ // constants for position 5
public AlignToScore(int position) {
switch (position) {
+
+ // position 1 is always the low bar
case 1:
- addSequential();
+ addSequential(new DriveForDistance(POS1_DIST1, DEFAULT_SPEED));
+ addSequential(new TurnForAngle(POS1_TURN1));
+ addSequential(new DriveForDistance(POS1_DIST2, DEFAULT_SPEED));
case 2:
- addSequential();
+ addSequential(new DriveForDistance(POS2_DIST1, DEFAULT_SPEED));
+ addSequential(new TurnForAngle(POS2_TURN1));
+ addSequential(new DriveForDistance(POS2_DIST2, DEFAULT_SPEED));
case 3:
- addSequential();
+ addSequential(new DriveForDistance(POS3_DIST1, DEFAULT_SPEED));
+ addSequential(new TurnForAngle(POS3_TURN1));
+ addSequential(new DriveForDistance(POS3_DIST2, DEFAULT_SPEED));
+ addSequential(new TurnForAngle(POS3_TURN2));
+ addSequential(new DriveForDistance(POS3_DIST3, DEFAULT_SPEED));
+ ;
case 4: