View Single Post
  #4   Spotlight this post!  
Unread 27-02-2016, 11:43
s-taylor s-taylor is offline
Scott Taylor
FRC #1735 (Green Reapers)
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Auburn, MA
Posts: 22
s-taylor has a spectacular aura abouts-taylor has a spectacular aura about
Re: How to pause GRIP data input?

In our testing of the system, we have seen the noise coming fast enough that successive calls to getArray() return different sized arrays (meaning the table updated asynchronously in the two cycles between the getArray() calls)

For now, I have solved this by checking the array size for all the elements, and if there is a mismatch I just punt that dataset. Even that isn't perfect because the array could have updated but be different sizes... but it's as close as I can get without an atomic operation.