I wrote a function like this to find what buttons where what on the joystick (The same joystick first gave us.)
Code:
void Default_Routine(void)
{
if(!p1_x)
printf("p1_x\n");
if(!p1_y)
printf("p1_y\n");
if(!p2_y)
printf("p2_y\n");
if(!p1_wheel)
printf("p1_wheel\n");
if(!p1_aux)
printf("p1_aux\n");
if(p1_sw_trig)
printf("p1_sw_trig\n");
if(p1_sw_top)
printf("p1_sw_top\n");
if(p1_sw_aux1)
printf("p1_sw_aux1\n");
if(p1_sw_aux2)
printf("p1_sw_aux2\n");
}
What I couldn't find on the joystick themselves were p1_wheel, and p1_aux. Also, when I pressed the hat in different directions, nothing happened. Any ideas?