|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#5
|
||||
|
||||
|
Re: Programming the joystick trigger...
JDM - The only problem with GetTrigger is that it makes the assumption that the trigger button is coming in as raw button 1. This is probably fine for the default joysticks in the KOP, but if you switch to something like a gamepad, trigger might not make as much sense. You can drop this in your code to quickly see what the button mapping is using the raw buttons. Once you know the mapping you can decide whether to use the built in methods (like GetTrigger) or to go get the raw button yourself.
Code:
for(int i = 0; i < 12; i++)
{
printf("%d:%d ", i + 1, driveStick->GetRawButton(i + 1));
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Joystick Programming | greatman05 | Programming | 11 | 30-01-2008 20:40 |
| Single Click On/Off Using the Trigger in EasyC | IraJason | Programming | 15 | 01-06-2007 11:37 |
| Joystick Programming | LieAfterLie | Programming | 7 | 15-02-2007 09:30 |
| Programming a Joystick | sbf2009 | Programming | 3 | 10-02-2007 15:59 |
| Programming the second joystick in PBASIC | archiver | 2001 | 2 | 24-06-2002 00:25 |