package org.robockets.tshirtcannon;

import org.robockets.buttonmanager.ButtonManager;
import org.robockets.buttonmanager.buttons.ActionButton;
import org.robockets.tshirtcannon.subsystems.cannon.AdjustCannon;
import org.robockets.tshirtcannon.subsystems.cannon.AlignGatling;
import org.robockets.tshirtcannon.subsystems.cannon.FireCannon;
import org.robockets.tshirtcannon.subsystems.cannon.PopCannon;
import org.robockets.tshirtcannon.subsystems.cannon.SpinGatling;

import edu.wpi.first.wpilibj.Joystick;

/**
 * This class is the glue that binds the controls on the physical operator
 * interface to the commands and command groups that allow control of the robot.
 */
public class OI {
	
	public OI() {
		ButtonManager.addJoystick(0);
		
		//ButtonManager.addButton(new ActionButton(0, 0, new FireCannon(), false));
		//ButtonManager.addButton(new ActionButton(0, 1, new AlignGatling(), false));
		ButtonManager.addButton(new ActionButton(0, 6, new PopCannon(0.05), false));
		ButtonManager.addButton(new ActionButton(0, 1, new AdjustCannon(ZAxisRelativeDirection.UP), true));
		ButtonManager.addButton(new ActionButton(0, 4, new AdjustCannon(ZAxisRelativeDirection.DOWN), true));
		ButtonManager.addButton(new ActionButton(0, 2, new SpinGatling(0.5), true));
		ButtonManager.addButton(new ActionButton(0, 3, new SpinGatling(-0.5), true));
	}
}


package org.robockets.tshirtcannon;

import org.robockets.buttonmanager.ButtonManager;
import org.robockets.buttonmanager.buttons.ActionButton;
import org.robockets.tshirtcannon.subsystems.cannon.AdjustCannon;
import org.robockets.tshirtcannon.subsystems.cannon.AlignGatling;
import org.robockets.tshirtcannon.subsystems.cannon.FireCannon;
import org.robockets.tshirtcannon.subsystems.cannon.PopCannon;
import org.robockets.tshirtcannon.subsystems.cannon.SpinGatling;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 * This class is the glue that binds the controls on the physical operator
 * interface to the commands and command groups that allow control of the robot.
 */
public class OI {
	
	public OI() {
		ButtonManager.addJoystick(0);
		
		//ButtonManager.addButton(new ActionButton(0, 0, new FireCannon(), false));
		//ButtonManager.addButton(new ActionButton(0, 1, new AlignGatling(), false));
		ButtonManager.addButton(new ActionButton(0, 6, new PopCannon(0.05), false));
		ButtonManager.addButton(new ActionButton(0, 1, new AdjustCannon(ZAxisRelativeDirection.UP), true));
		ButtonManager.addButton(new ActionButton(0, 4, new AdjustCannon(ZAxisRelativeDirection.DOWN), true));
		ButtonManager.addButton(new ActionButton(0, 2, new SpinGatling(0.5), true));
		ButtonManager.addButton(new ActionButton(0, 3, new SpinGatling(-0.5), true));
		
		// SmartDashboard stuff.
		SmartDashboard.putData("Pop Cannon", new PopCannon(0.05));
		SmartDashboard.putData("Adjust Cannon Upwards", new AdjustCannon(ZAxisRelativeDirection.UP));
		SmartDashboard.putData("Adjust Cannon Downwards", new AdjustCannon(ZAxisRelativeDirection.DOWN));
		SmartDashboard.putData("Spin Gatling Forward", new SpinGatling(1));
		SmartDashboard.putData("Spin Gatling Backwards", new SpinGatling(-1));
	}
}


Add commands to SmartDashboard dash.