// Path: src/org/usfirst/frc/team236/robot/commands/Intake.java
// public class Intake extends Command {
// 
//     public Intake() {
// 	// Use requires() here to declare subsystem dependencies
// 	// eg. requires(chassis);
// 	requires(Robot.intake);
//     }
// 
//     // Called just before this Command runs the first time
//     protected void initialize() {
//     }
// 
//     // Called repeatedly when this Command is scheduled to run
//     protected void execute() {
// 	if (Robot.intake.getLimit()) {
// 	    Robot.intake.stop();
// 	} else {
// 	    Robot.intake.intake();
// 	}
//     }
// 
//     // Make this return true when this Command no longer needs to run execute()
//     protected boolean isFinished() {
// 	return false;
//     }
// 
//     // Called once after isFinished returns true
//     protected void end() {
// 	Robot.intake.stop();
//     }
// 
//     // Called when another command which requires one or more of the same
//     // subsystems is scheduled to run
//     protected void interrupted() {
// 	Robot.intake.stop();
//     }
// }
// 
// Path: src/org/usfirst/frc/team236/robot/commands/ShiftDown.java
// public class ShiftDown extends Command {
// 
//     public ShiftDown() {
// 	// Use requires() here to declare subsystem dependencies
// 	// eg. requires(chassis);
// 	requires(Robot.drive);
//     }
// 
//     // Called just before this Command runs the first time
//     protected void initialize() {
//     }
// 
//     // Called repeatedly when this Command is scheduled to run
//     protected void execute() {
// 	Robot.drive.setSol(-1);
//     }
// 
//     // Make this return true when this Command no longer needs to run execute()
//     protected boolean isFinished() {
// 	return true;
//     }
// 
//     // Called once after isFinished returns true
//     protected void end() {
//     }
// 
//     // Called when another command which requires one or more of the same
//     // subsystems is scheduled to run
//     protected void interrupted() {
//     }
// }
// 
// Path: src/org/usfirst/frc/team236/robot/commands/arm/RawArmDown.java
// public class RawArmDown extends Command {
// 
//     public RawArmDown() {
// 	// Use requires() here to declare subsystem dependencies
// 	// eg. requires(chassis);
// 	requires(Robot.arm);
//     }
// 
//     // Called just before this Command runs the first time
//     protected void initialize() {
// 	Robot.arm.disable();
//     }
// 
//     // Called repeatedly when this Command is scheduled to run
//     protected void execute() {
// 	Robot.arm.setSpeed(-0.2);
//     }
// 
//     // Make this return true when this Command no longer needs to run execute()
//     protected boolean isFinished() {
// 	return Robot.arm.getBottomLimit();
//     }
// 
//     // Called once after isFinished returns true
//     protected void end() {
// 	Robot.arm.stop();
// 	Robot.arm.setSetpointRelative(0);
// 	Robot.arm.enable();
//     }
// 
//     // Called when another command which requires one or more of the same
//     // subsystems is scheduled to run
//     protected void interrupted() {
// 	end();
//     }
// }


import org.usfirst.frc.team236.robot.commands.Intake;
import org.usfirst.frc.team236.robot.commands.ShiftDown;
import org.usfirst.frc.team236.robot.commands.arm.RawArmDown;
import edu.wpi.first.wpilibj.command.CommandGroup;
import motionProfile.Profile;
package org.usfirst.frc.team236.robot.commands.profiled;



/**
 *
 */
public class Reach extends CommandGroup {

    public Reach(Profile profile) {
	// Add Commands here:
	// e.g. addSequential(new Command1());
	// addSequential(new Command2());
	// these will run in order.

	// To run multiple commands at the same time,
	// use addParallel()
	// e.g. addParallel(new Command1());
	// addSequential(new Command2());
	// Command1 and Command2 will run in parallel.

	// A command group will require all of the subsystems that each member
	// would require.
	// e.g. if Command1 requires chassis, and Command2 requires arm,
	// a CommandGroup containing them would require both the chassis and the
	// arm.
	addParallel(new ShiftDown());
	addSequential(new RawArmDown());

	addParallel(new Intake());
// Path: src/org/usfirst/frc/team236/robot/commands/Intake.java
// public class Intake extends Command {
// 
//     public Intake() {
// 	// Use requires() here to declare subsystem dependencies
// 	// eg. requires(chassis);
// 	requires(Robot.intake);
//     }
// 
//     // Called just before this Command runs the first time
//     protected void initialize() {
//     }
// 
//     // Called repeatedly when this Command is scheduled to run
//     protected void execute() {
// 	if (Robot.intake.getLimit()) {
// 	    Robot.intake.stop();
// 	} else {
// 	    Robot.intake.intake();
// 	}
//     }
// 
//     // Make this return true when this Command no longer needs to run execute()
//     protected boolean isFinished() {
// 	return false;
//     }
// 
//     // Called once after isFinished returns true
//     protected void end() {
// 	Robot.intake.stop();
//     }
// 
//     // Called when another command which requires one or more of the same
//     // subsystems is scheduled to run
//     protected void interrupted() {
// 	Robot.intake.stop();
//     }
// }
// 
// Path: src/org/usfirst/frc/team236/robot/commands/ShiftDown.java
// public class ShiftDown extends Command {
// 
//     public ShiftDown() {
// 	// Use requires() here to declare subsystem dependencies
// 	// eg. requires(chassis);
// 	requires(Robot.drive);
//     }
// 
//     // Called just before this Command runs the first time
//     protected void initialize() {
//     }
// 
//     // Called repeatedly when this Command is scheduled to run
//     protected void execute() {
// 	Robot.drive.setSol(-1);
//     }
// 
//     // Make this return true when this Command no longer needs to run execute()
//     protected boolean isFinished() {
// 	return true;
//     }
// 
//     // Called once after isFinished returns true
//     protected void end() {
//     }
// 
//     // Called when another command which requires one or more of the same
//     // subsystems is scheduled to run
//     protected void interrupted() {
//     }
// }
// 
// Path: src/org/usfirst/frc/team236/robot/commands/arm/RawArmDown.java
// public class RawArmDown extends Command {
// 
//     public RawArmDown() {
// 	// Use requires() here to declare subsystem dependencies
// 	// eg. requires(chassis);
// 	requires(Robot.arm);
//     }
// 
//     // Called just before this Command runs the first time
//     protected void initialize() {
// 	Robot.arm.disable();
//     }
// 
//     // Called repeatedly when this Command is scheduled to run
//     protected void execute() {
// 	Robot.arm.setSpeed(-0.2);
//     }
// 
//     // Make this return true when this Command no longer needs to run execute()
//     protected boolean isFinished() {
// 	return Robot.arm.getBottomLimit();
//     }
// 
//     // Called once after isFinished returns true
//     protected void end() {
// 	Robot.arm.stop();
// 	Robot.arm.setSetpointRelative(0);
// 	Robot.arm.enable();
//     }
// 
//     // Called when another command which requires one or more of the same
//     // subsystems is scheduled to run
//     protected void interrupted() {
// 	end();
//     }
// }


// Path: src/org/usfirst/frc/team236/robot/commands/profiled/Reach.java
import org.usfirst.frc.team236.robot.commands.Intake;
import org.usfirst.frc.team236.robot.commands.ShiftDown;
import org.usfirst.frc.team236.robot.commands.arm.RawArmDown;
import edu.wpi.first.wpilibj.command.CommandGroup;
import motionProfile.Profile;

package org.usfirst.frc.team236.robot.commands.profiled;



/**
 *
 */
public class Reach extends CommandGroup {

    public Reach(Profile profile) {
	// Add Commands here:
	// e.g. addSequential(new Command1());
	// addSequential(new Command2());
	// these will run in order.

	// To run multiple commands at the same time,
	// use addParallel()
	// e.g. addParallel(new Command1());
	// addSequential(new Command2());
	// Command1 and Command2 will run in parallel.

	// A command group will require all of the subsystems that each member
	// would require.
	// e.g. if Command1 requires chassis, and Command2 requires arm,
	// a CommandGroup containing them would require both the chassis and the
	// arm.
	addParallel(new ShiftDown());
	addSequential(new RawArmDown());

	addParallel(new Intake());
	addSequential(new FollowProfile(profile, true));