package org.robockets.stronghold.robot.highgoalshooter;

import org.robockets.stronghold.robot.Robot;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 * Move the turntable left or right.
 */
public class MoveTurnTable extends Command {

	Double angle = null; // Note that this is intentionally not the primitive angle so it can be compared to null.
	Double speed = null;
	
	/**
	 * Move turntable with Smart Dashboard input.
	 */
	public MoveTurnTable(){
		requires(Robot.shooter);
		SmartDashboard.putNumber("Turn table angle add", SmartDashboard.getNumber("Turn table angle add", 0));
		angle = SmartDashboard.getNumber("Turn table angle add");
	}
	
	/**
	 * Move the hood upwards or downwards continuously.
	 * @param rate		The speed to move at.
	 */
    public MoveTurnTable(double rate) {
        requires(Robot.shooter);
        speed = rate;
    }
    
    /**
	 * Move the hood upwards or downwards continuously. Note you have to enable the PID for this.
	 * @param angle			The angle to move the hood by. This is added to the current angle.
	 */
    public MoveTurnTable(float ang) {
        requires(Robot.shooter);
        
        angle = Robot.shooter.turnTablePidController.getSetpoint() + ang;
        SmartDashboard.putNumber("Turn Table Angle Add", angle);
    }
    
    // Called just before this Command runs the first time
    protected void initialize() {
    	if (angle != null){
    		Robot.shooter.turnTablePidController.setSetpoint(angle);
    	}
    	setTimeout(10);
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
    	if (angle == null) Robot.shooter.spinTurnTable(speed);
    	else {
    		angle = SmartDashboard.getNumber("Turn Table Angle Add");
    		Robot.shooter.turnTablePidController.setSetpoint(angle);
    		Robot.shooter.spinTurnTableAssisted();
    	}
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        if (angle != null) return Robot.shooter.turnTablePidController.onTarget();
        return false || isTimedOut();
    }

    // Called once after isFinished returns true
    protected void end() {
    	Robot.shooter.spinTurnTable(0);
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    	Robot.shooter.spinTurnTable(0);
    }
}
@@ -305,1234 +305,324 @@
 ble 
-angle = null; // Note that this is intentionally not the primitive angle so it can be compared to null.%0A%09Double speed = null;%0A%09%0A%09/**%0A%09 * Move turntable with Smart Dashboard input.%0A%09 */%0A%09public MoveTurnTable()%7B%0A%09%09requires(Robot.shooter);%0A%09%09SmartDashboard.putNumber(%22Turn table angle add%22, SmartDashboard.getNumber(%22Turn table angle add%22, 0));%0A%09%09angle = SmartDashboard.getNumber(%22Turn table angle add%22);%0A%09%7D%0A%09%0A%09/**%0A%09 * Move the hood upwards or downwards continuously.%0A%09 * @param rate%09%09The speed to move at.%0A%09 */%0A    public MoveTurnTable(double rate) %7B%0A        requires(Robot.shooter);%0A        speed = rate;%0A    %7D%0A    %0A    /**%0A%09 * Move the hood upwards or downwards continuously. Note you have to enable the PID for this.%0A%09 * @param angle%09%09%09The angle to move the hood by. This is added to the current angle.%0A%09 */%0A    public MoveTurnTable(float ang) %7B%0A        requires(Robot.shooter);%0A        %0A        angle = Robot.shooter.turnTablePidController.getSetpoint() + ang;%0A        SmartDashboard.putNumber(%22Turn Table Angle Add%22, angle);%0A    %7D%0A    %0A    // Called just before this Command runs the first time%0A    protected void initialize() %7B%0A    %09if (angle != null)%7B%0A    %09%09Robot.shooter.turnTablePidController.setSetpoint(angle);%0A    %09%7D
+speed = null;%0A%09%0A%09/**%0A%09 * Move the hood upwards or downwards continuously.%0A%09 * @param rate%09%09The speed to move at.%0A%09 */%0A    public MoveTurnTable(double rate) %7B%0A        requires(Robot.shooter);%0A        speed = rate;%0A    %7D%0A    %0A    // Called just before this Command runs the first time%0A    protected void initialize() %7B
 %0A   
@@ -749,27 +749,8 @@
    %09
-if (angle == null) 
 Robo
@@ -785,199 +785,8 @@
 d);%0A
-    %09else %7B%0A    %09%09angle = SmartDashboard.getNumber(%22Turn Table Angle Add%22);%0A    %09%09Robot.shooter.turnTablePidController.setSetpoint(angle);%0A    %09%09Robot.shooter.spinTurnTableAssisted();%0A    %09%7D%0A
     
@@ -917,106 +917,14 @@
     
-if (angle != null) return Robot.shooter.turnTablePidController.onTarget();%0A        return false %7C%7C
+return
  isT

Remove MoveTurnTable functionality.