View Single Post
  #25   Spotlight this post!  
Unread 09-02-2012, 07:49
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Image processing on the driver station laptop

It's very likely that the 20 ms sampling of Chris's receiving UDP socket was at the root of the problem. If the Driver Station's 20 millisecond UDP send was running just slightly faster than the one on the cRIO -- which it almost certainly would be if the cRIO code were being run in debug mode -- then packets would start to stack up. Since the cRIO was only retrieving one packet each 20 milliseconds, it could never catch up once it got behind. If the UDP receive function itself were used to control the loop rate, with a few seconds (or more) timeout, it wouldn't fall behind the way the original code can.