|
Re: Direct Joystick Access
Coincidentally, I was struggling with these same problems mere hours ago.
Last things first, you need to define the preprocessor macro _FRC_BOARD via Project->Build Options->Project->C18 tab->Add macro definition. This is because most of the definitions in API.h are inside #ifdefs that check whether it should include VEX or FRC versions of all the functions.
As for the joystick buttons, I believe the function is named GetOIDInput for the buttons and GetOIAInput for joystick axes, so for the trigger button on joystick 1, you would call GetOIDInput(PORT_1, TRIGGER_SW). (disclaimer: this is off the top of my head, I don't have the code in front of me)
|