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