|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
if you are going to use two or more joysticks how do you define the second joystick's "buttons"
how do you make / change definitions of "buttons" on the joystick(s) EX: top, fire, etc... ps. model # P-35221 gamepro gear prostick |
|
#2
|
|||
|
|||
|
Re: joysticks
The seconds joystick buttons are the same as on the first, except instead of p1(ex. p1_sw_trig for trigger) its p2 (ex. p2_sw_top). If your saying you want to make your own definition for them, use define. At the top of your file, put #define port1_trig p1_sw_trig;
When you put code in using port1_trig, it will be the same as if you put in p1_sw_trig. |
|
#3
|
||||
|
||||
|
thanks, but how to you make a new definition if a button was never defined in the first place?
Last edited by jfrank : 14-02-2008 at 12:57. |
|
#4
|
|||||
|
|||||
|
Re: joysticks
I suspect you may be using EasyC Pro and the answers for that are quite different than the answers given here for MPLAB.
In MPLAB all the joystick buttons (and more) are already defined for every Operator Interface joystick port. For example, all the joystick triggers are: p1_sw_trig p2_sw_trig p3_sw_trig p4_sw_trig Last edited by Mark McLeod : 14-02-2008 at 13:09. |
|
#5
|
|||
|
|||
|
Re: joysticks
Quote:
![]() |
|
#6
|
|||
|
|||
|
Re: joysticks
I suspect thats what the original question was. Thanks for clearing it up
|
|
#7
|
|||
|
|||
|
Re: joysticks
I believe all of the pins on the OI ports already have some sort of definition...
To see what names are given to different pins, you could check here. If you're using the USB chicklet, I think you have to tell it what buttons you want corresponding to what...there should be instructions for that specifically, though. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Joysticks.... | Moloch | Control System | 12 | 11-03-2005 20:58 |
| Joysticks | LBK Rules | Control System | 2 | 12-01-2005 20:38 |
| AVB joysticks..and other analogue joysticks | tml240 | Kit & Additional Hardware | 6 | 07-02-2004 12:45 |
| joysTICKS | edomus | Control System | 7 | 01-02-2004 00:51 |
| Joysticks | Neal Probert | Technical Discussion | 16 | 08-01-2003 21:59 |