View Single Post
  #4   Spotlight this post!  
Unread 02-02-2005, 21:22
JoelP JoelP is offline
whats the P for? Pazhayampallil
FRC #1155 (Bronx Science Sciborgs)
Team Role: Leadership
 
Join Date: Dec 2004
Rookie Year: 2005
Location: bronx, new york
Posts: 62
JoelP is a jewel in the roughJoelP is a jewel in the roughJoelP is a jewel in the rough
Send a message via AIM to JoelP
Re: need help w/ joystick code

dont even bother with setting up a deadzone.
this is assuming your using the default FRC codes
in user_routines.c go to the void Process_Data_From_Master_uP(void) function
then find the printf statement and change it from this
Code:
printf("Port1 Y %3d, X %3d, Fire %d, Top %d\r",(int)p1_y,(int)p1_x,(int)p1_sw_trig,(int)p1_sw_top);
to this
Code:
printf("Port1 Y %3d, Fire %d, Top %d\r",(int)p1_y,(int)p1_sw_trig,(int)p1_sw_top);
poof, no more x-axis

then to avoid any problems with the mixer, just remove it and replace it with another code to set pwm values to the y-axis
ex.
Code:
pwm01=p1_y
pwm02=254 - p2_y /*to reverse the pwm signals if you want,
                            instead of reversing the motor polarity*/

Last edited by JoelP : 02-02-2005 at 21:30.