![]() |
joysticks
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 |
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. |
Re: joysticks
thanks, but how to you make a new definition if a button was never defined in the first place?
|
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 |
Re: joysticks
Quote:
|
Re: joysticks
Quote:
|
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. |
| All times are GMT -5. The time now is 00:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi