Author Topic: Reading values from the Dashboard does not always work  (Read 864 times)

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 567
Reading values from the Dashboard does not always work
« on: May 29, 2017, 08:50:00 PM »
The scenario we're working with here is where the robot code wants to read a value from the dashboard before starting autonomous. The idea is to read a value set by the user and then act on that value. For example, the value may indicate which of several autonomous options to execute. The problem is that the value read via the network tables may not be the current value but rather the one that was in the table from the previous run of the code (previous match for example). Whether this happens outside of autonomous is unknown.

We have come across this problem in LabView (2016) and Java (2017). Presumably C++ has the same problem. It didn't seem to happen as often with LabVIEW as with Java but that's hard to quantify. We tried different timing techniques to try to make sure that the Dashboard value would be set prior to the robot's start of execution but so far we've had no luck in fixing this. And it's not clear if there's a way to prove that we fixed the problem - not seeing the behavior does not mean the problem has been fixed since we don't really know what the problem is in the first place (we only have suspicions).

For now the most reliable way to select different auto modes is to either program them in or have a hardware selection switch on the robot itself.
« Last Edit: October 21, 2018, 06:22:01 PM by Louis L »