View Single Post
  #3   Spotlight this post!  
Unread 21-02-2015, 23:23
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 251
BitTwiddler is on a distinguished road
Re: Robot Drive Not Running Fast Enough

Quote:
Originally Posted by mshafer1 View Post
It is the get DevRef.vi - now, hear me out.

This means that it always starts at the first item in the array, and goes through the array until it has found the index of the refnum name. It then uses this index to get the DeviceRef to pass out.

This means that the more of a given device is used, the more time is spent searching per call.

Hmm, you just made me realize that we've accidentally put a bunch of RegistryGets inside of the enclosing while loop in our autonomous code so our code keeps doing this name search on every pass. No wonder we were getting the "not running fast enough ..." error in our autonomous.
Thanks for the epiphany. I guess RegistryGets are not as harmless as they would seem.
Reply With Quote