Jump to content
The simFlight Network Forums

Baldrick

new Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Baldrick

  1. Thanks Pete! That clears up a number of things. Turns out my device handle problem was calling a sub-script via ipc.runlua. I have changed that to a dofile call and it works much better using a simple global variable.
  2. I'm doing some work with FSUIPC and Tripod's SuperScripts for the VRS SuperBug. I want to drive LEDs on a generic HID device in response to Offset changes. I've prototyped a system and it's working pretty well, but I've had to work around some funnies with the ipc.set and get calls. So I have some questions about how the ipc.set and get calls work. I wanted to store some tables via these calls. The documentation appears to state that they will work for 'any type' however my experience is that when trying to retrieve a table, I get back nil. If I change the variable to a string for example then it works. Can anyone explain how or why this might be? Possibly related - I wanted to open the HID device in one script and use it elsewhere. The com.openhid call works fine and I can write my Output Report to the device, LEDs light up etc. But if I try to store the device handle using ipc.set and later retrieve it for writing via ipc.get then the write call fails. It seems related to the above issue, any ideas would be appreciated. To deal with this last issue I am opening and closing the HID device handle every time I need to update the LEDs. However I have a small but noticeable latency between the virtual cockpit annunciators and the LEDs, I suspect the file open / close for every write is hurting me here. I'm pretty new to Lua, as I learn it further maybe a solution well become apparent. But if anyone can suggest a means to avoid these repeated openhid calls then that would be most helpful, thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.