|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: commands activated by trigger, how?
Quote:
To use the trigger treat it exactly like a button. |
|
#2
|
||||
|
||||
|
Re: commands activated by trigger, how?
Quote:
Well what I posted earlier is applicable to using using axes as buttons if anyone needs that lol. |
|
#3
|
|||
|
|||
|
Re: commands activated by trigger, how?
Thank you very much! I couldn't find anything saying it was actually just button 1 and didn't realize that in all the documentation that button one was never listed(just trigger).
|
|
#4
|
|||
|
|||
|
Re: commands activated by trigger, how?
Quote:
|
|
#5
|
|||
|
|||
|
Re: commands activated by trigger, how?
There is online documentation for CommandBased programming, in particular this link shows how to attach commands to a joystick.
Code:
Joystick DriveStick = new Joystick(1);
Button button = new JoystickButton(joystick, BUTTON_NUMBER);
public OI() {
button.whenPressed(new LauncherSpinWheels());
// ...
}
In addition to the online documentation, you might find these videos helpful if you're having trouble understanding CommandBasedProgram.: CommandBased Programming with RobotBuilder: http://www.youtube.com/watch?v=k7PaY...lgn vhGObeKzp CommandBased Programming without RobotBuilder: http://www.youtube.com/watch?v=v0vt9yKLxUQ |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|