Go to Post If winning that individual match is more important to you than being there in the first place, then I believe you've got your priorities in the wrong spot. - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2012, 18:26
Biolore Biolore is offline
Lead Programmer
AKA: Josh
FRC #3597 (Robo-Rangers)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Kittery, Maine
Posts: 68
Biolore is infamous around these partsBiolore is infamous around these parts
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2012, 18:33
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Using Command base system

It sounds like you're looking for the classes in wpilibj.buttons
Reply With Quote
  #3   Spotlight this post!  
Unread 03-02-2012, 11:15
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Using Command base system

Quote:
Originally Posted by RufflesRidge View Post
It sounds like you're looking for the classes in wpilibj.buttons
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());
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:40.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi