Add DISTANCE_TO_TURNING_POINT to AutonHopperShoot
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commandgroups / AutonHopperShoot.java
CommitLineData
aa770db6
MW
1package org.usfirst.frc.team3501.robot.commandgroups;
2
3import org.usfirst.frc.team3501.robot.Constants;
4import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
5import org.usfirst.frc.team3501.robot.commands.driving.TurnForAngle;
2fb7ee9c 6import org.usfirst.frc.team3501.robot.commands.shooter.RunFlyWheelContinuous;
aa770db6
MW
7
8import 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 */
14public 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
196ccee0 21 addSequential(new DriveDistance(DISTANCE_TO_TURNING_POSITION, 1));
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));
aa770db6 26 // Robot turns left towards hopper
82696d5c 27 addSequential(new TurnForAngle(45.0, Constants.Direction.RIGHT, 1.0));
aa770db6 28 // Robot drives in front of hopper
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
2fb7ee9c 39 addSequential(new RunFlyWheelContinuous(1.0));
aa770db6
MW
40
41 }
42}