View Single Post
  #44   Spotlight this post!  
Unread 08-02-2004, 18:10
SeanCassidy's Avatar
SeanCassidy SeanCassidy is offline
Antiregistered User
#0263 (Aftershock)
Team Role: Programmer
 
Join Date: Oct 2003
Location: Holtsville, NY
Posts: 37
SeanCassidy is an unknown quantity at this point
Re: New Joysticks...Good or Bad Choice by FIRST?

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?