// 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.subsystems;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.usfirst.frc330.Beachbot2013Java.Robot;
import org.usfirst.frc330.Beachbot2013Java.RobotMap;
import org.usfirst.frc330.Beachbot2013Java.commands.*;
/*
 * $Log: ShooterLow.java,v $
 * Revision 1.9  2013-03-15 02:51:40  echan
 * added cvs log comments
 *
 */
 
/**
 *
 */
public class ShooterLow extends Subsystem {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
    DoubleSolenoid shooterLoadSolenoid = RobotMap.shooterLowShooterLoadSolenoid;
    SpeedController shooterLowController = RobotMap.shooterLowShooterLowController;
    DigitalInput shooterLowHallEffectSensor = RobotMap.shooterLowShooterLowHallEffectSensor;
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
    
    Counter ShooterLowHallEffectCounter = RobotMap.shooterLowShooterLowHallEffectCounter;
    
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    public void initDefaultCommand() {
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
	
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
        setDefaultCommand(new ShootLow());
    }
    double counter=0;
    public void shoot(double voltage) {
        if (counter%10==0)
            SmartDashboard.putNumber("voltageLow", voltage);
        counter++;
        shooterLowController.set(voltage);
    }
    
    public void armLoadShooterOn() {
        shooterLoadSolenoid.set(DoubleSolenoid.Value.kReverse);
    }
    
    public void armLoadShooterOff() {
        shooterLoadSolenoid.set(DoubleSolenoid.Value.kForward);
    }
    
    public double launchFrisbeeSolenoidOffTime() {
        return Preferences.getInstance().getDouble("solenoidOffTime", 0.5);
    }
    
    public double getSpeed()
    {
//        return shooterLowEncoder.getRate();
        return (60/ShooterLowHallEffectCounter.getPeriod());
    }
    
    public void ShooterLowMotorToggle(double voltage)
    {
        if ( voltage == 0 )
            Robot.shooterLow.shoot(voltage);
        else
            Robot.shooterLow.shoot(0);
    }
    
}

@@ -865,16 +865,122 @@
 ava,v $%0A
+ * Revision 1.10  2013-03-17 01:57:05  jross%0A * fix shooter cylinder positions to match practice robot%0A *%0A
  * Revis
@@ -1981,24 +1981,26 @@
 Command());%0A
+//
         setD

delete ShootLow as default command (was added for debugging)