View Single Post
  #2   Spotlight this post!  
Unread 28-03-2005, 22:41
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is offline
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: Autocalibrate function

The joystick values should be able to be read during initialization, but just to be safe you could read them in the whole time during which the robot is disabled (by checking the disable bit).

We do almost the same thing, since our joysticks often become decalibrated, but instead of reading the joystick values at initialization or while in disable mode, we read them whenever p1_sw_top is depressed. That way we can quickly recalibrate during a match if the trim tab somehow gets moved. To calibrate before the match, we simply hit the button while the robot is on but disabled.

Hope this helps.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com