// RobotBuilder Version: 0.0.2
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in th future.
package org.usfirst.frc330.Beachbot2013Java.commands;
import edu.wpi.first.wpilibj.command.AutoSpreadsheetCommand;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.usfirst.frc330.Beachbot2013Java.Robot;
/*
 * $Log: ShootLow.java,v $
 * Revision 1.16  2013-03-16 02:24:31  jross
 * remove action item keyword in log
 *
 * Revision 1.15  2013-03-15 03:15:52  echan
 * Removed the Action Item
 *
 * Revision 1.14  2013-03-15 02:58:39  echan
 * robotbuilder update
 *
 * Revision 1.13  2013-03-15 02:51:09  echan
 * added cvs log comments
 *
 */
/**
 *
 */
public class  ShootLowBangBang extends Command implements AutoSpreadsheetCommand {
    public ShootLowBangBang() {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
	
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
        requires(Robot.shooterLow);
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
        SmartDashboard.putNumber("ShooterLowRPM", 3200);
        SmartDashboard.putNumber("ShooterLowCommand", 0.8);
        setRunWhenDisabled(true);
    }
    double rpm;
    // Called just before this Command runs the first time
    protected void initialize() {
        counter=0;
    }
    double counter;
    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        if (Robot.shooterLow.getSpeed() < SmartDashboard.getNumber("ShooterLowRPM"))
            Robot.shooterLow.shoot(1);
        else
            Robot.shooterLow.shoot(SmartDashboard.getNumber("ShooterLowCommand"));
        
        if (counter%10==0)
            SmartDashboard.putNumber("ShooterLowSpeed", Robot.shooterLow.getSpeed());
        counter++;
    }
    // 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() {
    }
    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
    public void setParam1(double param1) {
    }
    public void setParam2(double param2) {
    }
    public void setParam3(double param3) {
    }
    public void setStopAtEnd(boolean stopAtEnd) {
    }
    public Command copy() {
        return new ShootLowBangBang();
    }
}

@@ -770,16 +770,24 @@
 ShootLow
+BangBang
 .java,v 
@@ -788,16 +788,109 @@
 ava,v $%0A
+ * Revision 1.1  2013-03-17 20:25:33  jross%0A * Add bang bang control of the shooter motor%0A *%0A
  * Revis
@@ -1589,125 +1589,8 @@
 RES%0A
-        SmartDashboard.putNumber(%22ShooterLowRPM%22, 3200);%0A        SmartDashboard.putNumber(%22ShooterLowCommand%22, 0.8);%0A
     
@@ -1919,48 +1919,45 @@
 ) %3C 
-SmartDashboard.getNumber(%22
+Robot.shooterLow.get
 Shoot
-er
 Low
-RPM%22
+Setpoint(
 ))%0A 
@@ -2046,52 +2046,54 @@
 oot(
-SmartDashboard.getNumber(%22
+Robot.shooterLow.get
 Shoot
-er
 Low
-Command%22
+BangBangMinOutput(
 ));%0A

change setpoint and min speed to preferences