|
Autonomous Controls vs. Constants
Just wondering....has anyone else had issues with variables in autonomous? In our code, we like to make our variables controls so that they are easily adjustable from the front panel of autonomous. This worked fine while testing it at home. When we got to the competition, it became obvious that the code could not recognize these control values, even though we always set "make values default". There were no errors, but the robot practically made up its own numbers rather than use the ones we gave it. For example, rather than driving the 100 inches we set in the control, it drove something like 512 inches. Very random....We fixed the problem by changing all the controls back to constants. I think I remember a similar problem occurring last year with controls and constants, but I'm not sure. As a side note, the controls work fine everywhere else in the code (Begin, telop, periodic tasks, etc.)
Did anyone else have this issue? I'm curious as to why this occurs? It's got to be some kind of Labview thing...and word to the wise - USE CONSTANTS IN AUTONOMOUS!
|