Commit | Line | Data |
---|---|---|
aa770db6 MW |
1 | package org.usfirst.frc.team3501.robot.commandgroups; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Constants; | |
f28e5b70 | 4 | import org.usfirst.frc.team3501.robot.Constants.Direction; |
aa770db6 MW |
5 | import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance; |
6 | import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle; | |
2fb7ee9c | 7 | import org.usfirst.frc.team3501.robot.commands.shooter.RunFlyWheelContinuous; |
aa770db6 MW |
8 | |
9 | import edu.wpi.first.wpilibj.command.CommandGroup; | |
10 | ||
11 | /** | |
f2fe3ff5 MW |
12 | * // Robot starts in middle, goes to the hopper, then boiler,then shoots during |
13 | * auton | |
aa770db6 MW |
14 | */ |
15 | public class AutonHopperShoot extends CommandGroup { | |
16 | ||
f28e5b70 MW |
17 | // If red, direction is right; if blue, direction is left |
18 | private static final Direction DIRECTION_TO_HOPPER = Constants.Direction.RIGHT; | |
19 | // If red, direction is left; if blue, direction is right | |
20 | private static final Direction DIRECTION_TO_BOILER = Constants.Direction.LEFT; | |
21 | ||
f2fe3ff5 | 22 | public AutonHopperShoot() { |
aa770db6 | 23 | // Robot drives from center to front of airship |
fc018538 | 24 | addSequential(new DriveDistance(94.75, 0.75)); |
aa770db6 | 25 | // Robot turns towards hopper |
f28e5b70 | 26 | addSequential(new TurnForAngle(90.0, DIRECTION_TO_HOPPER, 1.0)); |
47ff9a73 | 27 | // Robot drives into hopper switch |
fc018538 | 28 | addSequential(new DriveDistance(44.0, 1)); |
aa770db6 | 29 | // Robot backs up from switch |
fc018538 | 30 | addSequential(new DriveDistance(5.0, -1.0)); |
aa770db6 | 31 | // Robot turns towards the boiler |
f28e5b70 | 32 | addSequential(new TurnForAngle(90.0, DIRECTION_TO_HOPPER, 1.0)); |
aa770db6 | 33 | // Robot drives to boiler |
fc018538 | 34 | addSequential(new DriveDistance(75.7, 0.75)); |
aa770db6 | 35 | // Robot turns parallel to boiler |
fc018538 | 36 | addSequential(new TurnForAngle(46.6, Constants.Direction.LEFT, 1.0)); |
aa770db6 | 37 | // Shoot |
47ff9a73 | 38 | addSequential(new RunFlyWheelContinuous()); |
aa770db6 MW |
39 | |
40 | } | |
41 | } |