|
Re: GRIP, Network Tables, and mutual exclusion
NetworkTables guarantees individual reads and writes are atomic, so you should be good there.
It's possible that GRIP is writing, for example, the area array and the centerX array, and one in a while you happen to read both of them after only one has updated. In this case, the arrays could have different lengths, so you could get an error if you use the same loop counter for them.
The solution right now would be to check that the arrays have the same length, although in the future it would be good to support NetworkTables RPCs.
If you're only reading a single snapshot, you can also set "GRIP/run" to false and wait a little bit before reading anything.
|