projects
/
3501
/
stronghold-2016
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add precondition and Timeout to Expel and Intake commands
[3501/stronghold-2016]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
DefaultAutonStrategy.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java
b/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java
index 97070637f1bc5901fa8e2510a858b17354d72ac7..99fe317d3945d2ab85ebf689d2f561d458a8c940 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java
@@
-8,13
+8,8
@@
import edu.wpi.first.wpilibj.command.CommandGroup;
* The default autonomous strategy involves passing the defense that is in front
* of it, aiming the robot/ shooter towards the goal, and shooting.
*/
* The default autonomous strategy involves passing the defense that is in front
* of it, aiming the robot/ shooter towards the goal, and shooting.
*/
-public class DefaultAutonStrategy extends CommandGroup {
- // in feet
- // distance along a platform
- final double DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD = 4.0;
- // number from -1 to 1
- final double SPEED_FOR_PASSING_DEFENSE = 0.5;
+public class DefaultAutonStrategy extends CommandGroup {
public DefaultAutonStrategy(int position, Defense defense) {
public DefaultAutonStrategy(int position, Defense defense) {
@@
-30,46
+25,37
@@
public class DefaultAutonStrategy extends CommandGroup {
case ROUGH_TERRAIN:
case ROUGH_TERRAIN:
- addSequential(
- new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2,
- DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2));
+ addSequential(new PassRoughTerrain());
case LOW_BAR:
case LOW_BAR:
- addSequential(
- new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2,
- SPEED_FOR_PASSING_DEFENSE));
+ addSequential(new PassLowBar());
case CHEVAL_DE_FRISE:
case CHEVAL_DE_FRISE:
- addSequential(new
Lower
ChevalDeFrise());
+ addSequential(new
Pass
ChevalDeFrise());
case DRAWBRIDGE:
case DRAWBRIDGE:
- addSequential(new
Lower
DrawBridge());
+ addSequential(new
Pass
DrawBridge());
case MOAT:
case MOAT:
- addSequential(new DriveForDistance(
- DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
+ addSequential(new PassMoat());
case ROCK_WALL:
case ROCK_WALL:
- addSequential(new DriveForDistance(
- DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
+ addSequential(new PassRockWall());
case RAMPART:
case RAMPART:
- addSequential(new DriveForDistance(
- DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE));
+ addSequential(new PassRampart());
default:
break;
}
default:
break;
}
- // TODO: put in the argument that goes inside of aim, based on the position
- // variable that was passed into the command group
- addSequential(new Aim());
+ addSequential(new AimAndAlign());
addSequential(new Shoot());
}
addSequential(new Shoot());
}