// RobotBuilder Version: 2.0
//
// 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 the future.


package org.usfirst.frc4001.frc2016Explore;

import org.usfirst.frc4001.frc2016Explore.commands.*;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.JoystickButton;



/**
 * 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 {
    //// CREATING BUTTONS
    // One type of button is a joystick button which is any button on a joystick.
    // You create one by telling it which joystick it's on and which button
    // number it is.
    // Joystick stick = new Joystick(port);
    // Button button = new JoystickButton(stick, buttonNumber);

    // There are a few additional built in buttons you can use. Additionally,
    // by subclassing Button you can create custom triggers and bind those to
    // commands the same as any other Button.

    //// TRIGGERING COMMANDS WITH BUTTONS
    // Once you have a button, it's trivial to bind it to a button in one of
    // three ways:

    // Start the command when the button is pressed and let it run the command
    // until it is finished as determined by it's isFinished method.
    // button.whenPressed(new ExampleCommand());

    // Run the command while the button is being held down and interrupt it once
    // the button is released.
    // button.whileHeld(new ExampleCommand());

    // Start the command when the button is released  and let it run the command
    // until it is finished as determined by it's isFinished method.
    // button.whenReleased(new ExampleCommand());

	public JoystickButton intakeButton;
	public JoystickButton low_shoot;
	public Joystick joystick;
	public Joystick game_controller;


    public OI() {
        
        // SmartDashboard Buttons
        SmartDashboard.putData("Autonomous Command", new AutonomousCommand());
        SmartDashboard.putData("IntakeReceive", new IntakeReceive());
        
        
        game_controller = new Joystick(0);
        joystick = new Joystick(1);
        
        // *** GAME CONTROLLER BUTTONS & CONTROL ***
        
        //game_controller button 6 (RB)
        intakeButton = new JoystickButton(game_controller,6);
        intakeButton.whenPressed(new IntakeReceive());
        
        // *** JOYSTICK BUTTONS & CONTROL ***
        
        //low shoot
        low_shoot = new JoystickButton(joystick, 3);
        low_shoot.whileHeld(new ShootLow());
        
    }

}


@@ -2764,32 +2764,30 @@
 akeButton.wh
-enPresse
+ileHel
 d(new Intake

switch intake to whileheld