Add definition for numbers and add description
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commandgroups / AutonHopperShoot.java
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;
6 import org.usfirst.frc.team3501.robot.commands.shooter.RunFlyWheelContinuous;
7
8 import edu.wpi.first.wpilibj.command.CommandGroup;
9
10 /**
11 * // Robot starts in middle, goes to the hopper, then boiler,then shoots during
12 * auton
13 */
14 public class AutonHopperShoot extends CommandGroup {
15
16 private static final double DISTANCE_TO_HOPPER = 224.569677;
17
18 public AutonHopperShoot() {
19 // Robot drives from center to front of airship
20 addSequential(new DriveDistance(5.0, 1));
21 // Robot turns towards hopper
22 addSequential(new TurnForAngle(45.0, Constants.Direction.RIGHT, 1.0));
23 // Robot drives near hopper
24 addSequential(new DriveDistance(DISTANCE_TO_HOPPER, 1));
25 // Robot turns left towards hopper
26 addSequential(new TurnForAngle(45.0, Constants.Direction.RIGHT, 1.0));
27 // Robot drives in front of hopper
28 addSequential(new DriveDistance(2.0, 1.0));
29 // Robot backs up from switch
30 addSequential(new DriveDistance(2.0, -1.0));
31 // Robot turns towards the boiler
32 addSequential(new TurnForAngle(90.0, Constants.Direction.RIGHT, 1.0));
33 // Robot drives to boiler
34 addSequential(new DriveDistance(123.3, 1.0));
35 // Robot turns parallel to boiler
36 addSequential(new TurnForAngle(45.0, Constants.Direction.LEFT, 1.0));
37 // Shoot
38 addSequential(new RunFlyWheelContinuous(1.0));
39
40 }
41 }