1 package org
.usfirst
.frc
.team3501
.robot
;
3 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
4 import org
.usfirst
.frc
.team3501
.robot
.commands
.ExampleCommand
;
7 * This class is the glue that binds the controls on the physical operator
8 * interface to the commands and command groups that allow control of the robot.
12 // One type of button is a joystick button which is any button on a joystick.
13 // You create one by telling it which joystick it's on and which button
15 // Joystick stick = new Joystick(port);
16 // Button button = new JoystickButton(stick, buttonNumber);
18 // There are a few additional built in buttons you can use. Additionally,
19 // by subclassing Button you can create custom triggers and bind those to
20 // commands the same as any other Button.
22 //// TRIGGERING COMMANDS WITH BUTTONS
23 // Once you have a button, it's trivial to bind it to a button in one of
26 // Start the command when the button is pressed and let it run the command
27 // until it is finished as determined by it's isFinished method.
28 // button.whenPressed(new ExampleCommand());
30 // Run the command while the button is being held down and interrupt it once
31 // the button is released.
32 // button.whileHeld(new ExampleCommand());
34 // Start the command when the button is released and let it run the command
35 // until it is finished as determined by it's isFinished method.
36 // button.whenReleased(new ExampleCommand());