/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.usfirst.frc3946.UltimateAscent.commands;

/**
 *
 * @author gixxy
 */
public class LaunchFrisbee extends CommandBase {
    
    public LaunchFrisbee() {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
        requires(firePiston);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
        
        setTimeout(2);
        firePiston.extend();
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return isTimedOut();
    }

    // Called once after isFinished returns true
    protected void end() {
        firePiston.retract();
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}

@@ -1,10 +1,11 @@
 /*
+%0D
 %0A * To c
@@ -49,16 +49,17 @@
 emplates
+%0D
 %0A * and 
@@ -90,20 +90,22 @@
  editor.
+%0D
 %0A */
+%0D
 %0Apackage
@@ -153,16 +153,111 @@
 nds;
-%0A
+%0D%0A%0D%0Aimport edu.wpi.first.wpilibj.Timer;%0D%0Aimport edu.wpi.first.wpilibj.command.CommandGroup;%0D%0A%0D
 %0A/**
+%0D
 %0A *
+%0D
 %0A * 
@@ -268,17 +268,22 @@
 hor 
-gixxy
+10482352%0D
 %0A */
+%0D
 %0Apub
@@ -325,19 +325,22 @@
 mand
-Base
+Group
  %7B
+%0D
 %0A    
+%0D
 %0A   
@@ -360,24 +360,25 @@
 hFrisbee() %7B
+%0D
 %0A        // 
@@ -381,61 +381,27 @@
  // 
-Use requires() here to declare subsystem dependencies
+Add Commands here:%0D
 %0A   
@@ -413,29 +413,43 @@
 // e
+.
 g. 
-requires(chassis
+addSequential(new Command1()
 );
+%0D
 %0A   
@@ -457,161 +457,217 @@
     
-requires(firePiston
+//      addSequential(new Command2()
 );
+%0D
 %0A    
-%7D%0A%0A
     // 
-Called just before this Command runs the first time%0A    protected void initialize() %7B%0A        %0A        setTimeout(2
+these will run in order.%0D%0A%0D%0A        // To run multiple commands at the same time,%0D%0A        // use addParallel()%0D%0A        // e.g. addParallel(new Command1()
 );
+%0D
 %0A   
@@ -675,44 +675,60 @@
     
-firePiston.extend(
+//      addSequential(new Command2()
 );
+%0D
 %0A    
-%7D%0A%0A
     // C
 alle
@@ -727,527 +727,500 @@
 // C
-alled repeatedly when this Command is scheduled to run%0A    protected void execute() %7B%0A        
+ommand1 and Command2 will run in parallel.%0D%0A%0D%0A        // A command group will require all of the subsystems that each member%0D
 %0A    
-%7D%0A%0A
     // 
-Make this return true when this Command no longer needs to run execute()%0A    protected boolean isFinished() %7B%0A        return isTimedOut();
+would require.%0D%0A        // e.g. if Command1 requires chassis, and Command2 requires arm,%0D
 %0A    
-%7D%0A%0A
     // 
-Called once after isFinished returns true%0A    protected void end() %7B%0A        firePiston.retract();%0A    %7D%0A%0A    // Called when another command which requires one or more of the same%0A    // subsystems is scheduled to run%0A    protected void interrupted() %7B
+a CommandGroup containing them would require both the chassis and the%0D%0A        // arm.%0D%0A        %0D%0A        addSequential(new SetFrisbee());%0D%0A        addParallel(new Wheels());%0D%0A        Timer.delay(1.5);%0D%0A        addSequential(new SetFirePiston());%0D
 %0A    %7D
+%0D
 %0A%7D
+%0D
 %0A

set up system for launching frisbee