|
Re: abstracting/mapping the joystick(s)
We've been doing it for years. It's not published anywhere, but it's pretty easy.
The biggest help I can suggest is to create a "typedef" .ctl file to define a cluster containing the functional names. Use an instance of it as the "type" input to a Bundle by Name function, and you'll end up with the output of the mapping subVI being the same type. If you don't use a .ctl, when you add more functions, there will be a lot of places that will break and need to be deleted/recreated/reconnected.
You have a choice of reading the actual joystick(s) inside the mapping function, or reading the joystick outside and passing the axis and button clusters as inputs to it.
If you have a clean split between driver and operator functions, you can create separate mapping subVIs for each. If there's some overlap/override/cooperative action, you can probably work out a good way to have separate output clusters, and use each where appropriate.
|