make constants for distance between neutral zone and courtyard and for speed
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / DefaultAutonStrategy.java
CommitLineData
78d476cc
ME
1package org.usfirst.frc.team3501.robot.commands;
2
dd794a4e
ME
3import org.usfirst.frc.team3501.robot.Constants.Defense;
4
78d476cc
ME
5import edu.wpi.first.wpilibj.command.CommandGroup;
6
7/**
53d61b3e
ME
8 * The default autonomous strategy involves passing the defense that is in front
9 * of it, aiming the robot/ shooter towards the goal, and shooting.
78d476cc
ME
10 */
11public class DefaultAutonStrategy extends CommandGroup {
78d476cc 12
ab237853
ME
13 // in feet
14 // distance along a platform
15 final double DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD = 4.0;
16 // number from -1 to 1
17 final double SPEED_FOR_PASSING_DEFENSE = 0.5;
18
dd794a4e 19 public DefaultAutonStrategy(int position, Defense defense) {
78d476cc 20
3c259ed2
ME
21 // TODO: any variable that is not declared/instantiated are vars that need
22 // to be tested for their value
23
ab237853 24 // pass the defense
53d61b3e 25 switch (defense) {
ab237853 26
dd794a4e 27 case PORTCULLIS:
ab237853
ME
28 // we are assuming that LiftPortcullis() includes moving the defense arm
29 // and driving forward
30
3c259ed2 31 addSequential(new LiftPortcullis());
ab237853 32
dd794a4e 33 case SALLY_PORT:
ab237853 34
3c259ed2 35 // addSequential();
ab237853 36
dd794a4e 37 case ROUGH_TERRAIN:
3c259ed2 38
ab237853
ME
39 addSequential(
40 new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2,
41 SPEED_FOR_PASSING_DEFENSE));
3c259ed2 42
dd794a4e 43 case LOW_BAR:
3c259ed2 44
ab237853
ME
45 addSequential(
46 new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2,
47 SPEED_FOR_PASSING_DEFENSE));
3c259ed2 48
dd794a4e 49 case CHEVAL_DE_FRISE:
3c259ed2
ME
50
51 addSequential(new LowerChevalDeFrise());
52
dd794a4e 53 case DRAWBRIDGE:
3c259ed2
ME
54
55 addSequential(new LowerDrawBridge());
56
dd794a4e 57 case MOAT:
3c259ed2 58
ab237853
ME
59 addSequential(new DriveForDistance(
60 DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
3c259ed2 61
dd794a4e 62 case ROCK_WALL:
3c259ed2 63
ab237853
ME
64 addSequential(new DriveForDistance(
65 DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
3c259ed2 66
dd794a4e 67 case RAMPART:
3c259ed2 68
ab237853
ME
69 addSequential(new DriveForDistance(
70 DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
3c259ed2 71
dd794a4e
ME
72 default:
73 break;
78d476cc 74 }
53d61b3e 75
ab237853
ME
76 // aim towards goal
77
78 // shoot
79
80 //
81
53d61b3e
ME
82 }
83
78d476cc 84}