View Single Post
  #12   Spotlight this post!  
Unread 04-14-2014, 09:38 AM
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: FIRST please fix....

Quote:
Originally Posted by John View Post
(the encoders reset at the beginning of auto)
Our software protects against this kind of field fault so I guess it's possible this happened to us but we wouldn't know. We've been doing it this way for years for various reasons.

Here's how we do it (in case anyone is interested):

1) All of the sensor zero-point calculation and resetting is done in disabled.vi

2) We keep a global variable called "VisitedEnabled" which gets initialized to FALSE. As soon as the robot becomes enabled, this variable is set to TRUE and can never become FALSE again without a cRIO reboot (or a debug-mode override).

3) In disabled.vi (or your disabled mode code) sensors are rezero'd/cal'd ONLY if VisitedEnabled is FALSE.
__________________
-
An ounce of perception is worth a pound of obscure.