/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.edinarobotics.zephyr.autonomous;

import com.edinarobotics.utils.autonomous.AutonomousStep;
import com.edinarobotics.zephyr.Zephyr;
import edu.wpi.first.wpilibj.Timer;

/**
 *
 * @author Danny
 */
public class FireShooterStep extends AutonomousStep{
    private static final double SHOOTER_WARMUP_DELAY = 3;
    private static final double SHOOTER_PISTON_UP_TIME = 0.5;
    
    double shooterSpeed;
    Zephyr robot;
    Timer time;
    boolean isFinished;
   
    public FireShooterStep(double shooterSpeed,Zephyr robot)
    {
        this.shooterSpeed = shooterSpeed;
        this.robot = robot;
        time = new Timer();
        isFinished = false;
    }
    
    public void start()
    {
        robot.shooterSpeed = -shooterSpeed;
        robot.mechanismSet();
        time.start();
    }
    
    public void run()
    {
        if(time.get() >= SHOOTER_WARMUP_DELAY+SHOOTER_PISTON_UP_TIME){
            robot.ballLoaderUp = false;
            robot.mechanismSet();
            isFinished = true;
        }
        else if(time.get() >= SHOOTER_WARMUP_DELAY){
            robot.ballLoaderUp = true;
            robot.mechanismSet();
        }
        else{
            robot.mechanismSet();
        }
    }
    
    public boolean isFinished()
    {
        return isFinished;
    }
    
    public void stop(){
        robot.shooterSpeed = 0;
        robot.mechanismSet();
    }
}

@@ -1,104 +1,4 @@
-/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0A
 pack
@@ -184,25 +184,99 @@
 *%0A *
-%0A * @author Danny
+ An autonomous step that warms up the shooter to a specific speed and then%0A * fires a ball.
 %0A */
@@ -537,19 +537,235 @@
 nished;%0A
-
    
+ %0A    /**%0A     * Constructs a FireShooterStep that fires the shooter at the specified%0A     * speed.%0A     * @param shooterSpeed the speed for the shooter (a positive value).%0A     * @param robot %7B@link Zephyr%7D.%0A     */
 %0A    pub

Fix comments in FireShooterStep.