2018-03-05 18:50:01 -07:00
|
|
|
package org.usfirst.frc4388.robot.commands.auton;
|
|
|
|
|
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.DriveAbsoluteTurnMP;
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.DriveGyroReset;
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.DriveSpeedShift;
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.DriveStraightBasic;
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.DriveStraightMP;
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.DriveTurnBasic;
|
2018-03-05 18:57:23 -07:00
|
|
|
import org.usfirst.frc4388.robot.commands.ElevatorBasic;
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.ElevatorSetSpeed;
|
2018-03-05 18:50:01 -07:00
|
|
|
import org.usfirst.frc4388.robot.commands.IntakePosition;
|
|
|
|
|
import org.usfirst.frc4388.robot.commands.IntakeSetSpeed;
|
|
|
|
|
import org.usfirst.frc4388.robot.subsystems.Carriage;
|
|
|
|
|
import org.usfirst.frc4388.robot.subsystems.Drive;
|
|
|
|
|
import org.usfirst.frc4388.utility.MPSoftwarePIDController.MPSoftwareTurnType;
|
|
|
|
|
|
|
|
|
|
import edu.wpi.first.wpilibj.command.CommandGroup;
|
|
|
|
|
import edu.wpi.first.wpilibj.command.WaitCommand;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
2018-03-05 18:57:23 -07:00
|
|
|
public class CenterLeft extends CommandGroup {
|
2018-03-05 18:50:01 -07:00
|
|
|
|
2018-03-05 18:57:23 -07:00
|
|
|
public CenterLeft() {
|
2018-03-05 18:50:01 -07:00
|
|
|
addSequential(new DriveGyroReset());
|
2018-03-05 18:57:23 -07:00
|
|
|
|
2018-03-05 18:50:01 -07:00
|
|
|
addSequential(new IntakePosition(true));
|
2018-03-05 18:57:23 -07:00
|
|
|
addSequential(new DriveStraightBasic(-10, 60, true, true, 0));
|
|
|
|
|
addSequential(new DriveTurnBasic(true, 130, 300, MPSoftwareTurnType.TANK));
|
|
|
|
|
addSequential(new DriveStraightBasic(50, 60, true, true, 0));
|
|
|
|
|
addSequential(new DriveTurnBasic(true, 28, 300, MPSoftwareTurnType.TANK));
|
|
|
|
|
addSequential(new ElevatorBasic(20));
|
|
|
|
|
addSequential(new DriveStraightBasic(25, 60, true, true, 0));
|
2018-03-05 18:50:01 -07:00
|
|
|
addSequential(new IntakeSetSpeed(Carriage.CUBE_EJECT_SPEED));
|
2018-03-05 18:57:23 -07:00
|
|
|
//addSequential(new WaitCommand(.1));
|
2018-03-05 18:50:01 -07:00
|
|
|
addSequential(new IntakePosition(false));
|
2018-03-05 18:57:23 -07:00
|
|
|
addSequential(new WaitCommand(.5));
|
2018-03-05 18:50:01 -07:00
|
|
|
addSequential(new IntakeSetSpeed(Carriage.CUBE_STOP_SPEED));
|
|
|
|
|
|
|
|
|
|
//addSequential(new DriveStraightMP(60, 10, true, true, 0)); // 95 for 112" greenville
|
|
|
|
|
|
|
|
|
|
}
|
2018-03-05 18:57:23 -07:00
|
|
|
}
|