Quote:
Originally Posted by Jefferson
Would you be willing to provide some sample code of how you accomplish this?
|
What programming language are you using?
As a trivial example, if in LabVIEW one were to determine in each robot mode (disabled, teleop, autonomous, etc) the command they wanted to send a motor and store it in a global variable, they could then read that global variable in timed tasks in a loop at whatever frequency they wished and call the set motor VI from there.
This can help free your Teleop loop to run as fast as ds packets are received.
Similar trivial examples can be constructed in C++ and Java.
There are a lot better ways that this could be handled, like using an action engine in LabVIEW, or a class in any other language rather than a global variable, but the general principle remains the same.