View Single Post
  #24   Spotlight this post!  
Unread 23-01-2008, 19:00
brittanys's Avatar
brittanys brittanys is offline
Paradigm Shift
FRC #1259 (Paradigm Shift)
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Pewaukee
Posts: 2
brittanys is an unknown quantity at this point
Re: A New Programmer

Another general comment on your original bit of code...besides defining variables to use in place of direct values. You will want to include some sort of "deadband" into almost all of your drive code to account for the dynamic trim of the joysticks, prevent twitching/jerking, et cetera.

As somebody posted previously (sorry, I don't remember the name!), true neutral usually ends up at a value higher or lower than 127 (132 is quite common). To compensate for this fluctuation, we include a deadband of 6 in either direction, so "neutral" is really a range around 127.

Good luck!