Go to Post Antimatter.. It will help us in the never ending quest to build the bot under the weight limit. - Elgin Clock [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 14-01-2009, 16:09
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Joystick buttons access

Does anyone know how to access the buttons labeled 1,2,3,... on the joysticks in C/C++?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2009, 17:09
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: Joystick buttons access

Have a look at Joystick::GetRawButton().
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2009, 18:50
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Joystick buttons access

so,
Code:
if (Joystick::GetRawButton(2))//button 2 on the top
//complex code if this is pressed
or
Code:
Joystick stick(1);
if (stick.GetRawButton(2))//button 2 on the top
//complex code if this is pressed
Nothing else?
Reply With Quote
  #4   Spotlight this post!  
Unread 14-01-2009, 19:38
Eric Finn's Avatar
Eric Finn Eric Finn is offline
Registered User
FRC #0166 (Chop Shop)
Team Role: College Student
 
Join Date: May 2006
Rookie Year: 2005
Location: Merrimack, NH
Posts: 101
Eric Finn has a spectacular aura aboutEric Finn has a spectacular aura about
Send a message via AIM to Eric Finn
Re: Joystick buttons access

The second one, and yes, that is fine.
__________________
It always takes longer than you expect, even when you take into account Hofstadter's Law.
--Hofstadter's Law

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
joystick and extra buttons TEAM1949 Programming 3 18-02-2008 13:22
Programing joystick buttons Shivang1923 Programming 8 09-02-2008 16:21
Buttons to Pins on Joystick yarb65 Electrical 1 24-08-2007 20:39
Direct Joystick Access billdar Programming 2 27-01-2007 22:43
Assigning Joystick buttons.... archiver 2001 5 24-06-2002 00:59


All times are GMT -5. The time now is 13:15.

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