|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Using Command base system
so... I'm trying to use the new command base system, so I've gone through the cookbook thing. I don't understand how to make a button on a controller link to a command. The cookbook uses a button class that isn't in the library, so how does this work?
|
|
#2
|
|||
|
|||
|
Re: Using Command base system
It sounds like you're looking for the classes in wpilibj.buttons
|
|
#3
|
||||
|
||||
|
Re: Using Command base system
Quote:
Code:
Button js1_button1 = new JoystickButton(js1, 1); // Create a Joystick Button, arguments sent to the constructor are (stickObject, button number) js1_button1.whileHeld(new CommandHere()); or js1_button1.whenPressed(new CommandHere()); // buttonObject.whileHeld, whenPressed, or whenReleased (new Command Name()); |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|