Quote:
Originally Posted by Levansic
I'm slightly confused here. Am I interpreting correctly that you essentially have a VI for your drive and a VI for your manipulators, and you just call each with a selector for the various behaviors? I am guessing that both generate and use their own refnums.
That seems like a great idea for code organization and bringing new programmers up to speed. Instead of hop-scotching through all of the different VI's like teleop.vi and Periodic_tasks.vi, you have all related code contained in each part's VI.
|
That's exactly right. The other unobvious bit is that we keep all the RefNums in a shift register cluster so we never have to do a RefNum Get. We do RefNum Set in Begin just so we can use Test mode.
Quote:
|
If I am interpreting correctly, how do you deal with autonomous, as I assume that there has to be some sort of sequencing and communication between both drive and superstructure to complete tasks?
|
Autonomous is independent at the moment, using a flat sequence. If we wanted to keep it in the rest of the code, we'd probably implement state machines with a shared state variable.