r2500 Posted January 23, 2011 Report Posted January 23, 2011 I have some GoFlight units connected to a client computer and then through WideClient/WideFS to FSX. This works acceptably if I use GFDisplay.exe to operate the GoFlight displays and leds and FSUIPC to handle programming the knobs and buttons. It seems reasonably clear that if the GoFlight modules were connected directly to the FSX computer, I could use Lua code to program and control all aspects of the hardware. But can I do everything via Lua when the hardware is connected to a client computer? My coding experiments suggest that it is not: the "gfd" part of the Lua library seems not to be in WideClient and an error message that "gfd" is "nil" is logged when I attempt to run code such as gfdDisplay.lua. But I'd like to be sure before I do very much more with the GFDisplay.ini file.
Pete Dowson Posted January 23, 2011 Report Posted January 23, 2011 I have some GoFlight units connected to a client computer and then through WideClient/WideFS to FSX. This works acceptably if I use GFDisplay.exe to operate the GoFlight displays and leds and FSUIPC to handle programming the knobs and buttons. It seems reasonably clear that if the GoFlight modules were connected directly to the FSX computer, I could use Lua code to program and control all aspects of the hardware. But can I do everything via Lua when the hardware is connected to a client computer? My coding experiments suggest that it is not: As I thought was made clear in the Lua library documentation, the GFD library is not supported in WideClient -- see where it says "not in WideClient" in the title for that library? Maybe you have out of date Lua documentation, from before WideClient supported Lua at all? Please check the Download Links subforum. It might be possible to add most if not all of that library to Wideclient. But it isn't a trivial job. much of the one in FSUIPC used existing FSUIPC code. I wioll consider it though. Regards Pete
r2500 Posted January 23, 2011 Author Report Posted January 23, 2011 Indeed, I had docs from March, 2010. In the up to date documentation, the restriction is quite clearly marked. I can comfortably make do with gfdisplay.exe. Thanks for the rapid reply. Richard As I thought was made clear in the Lua library documentation, the GFD library is not supported in WideClient -- see where it says "not in WideClient" in the title for that library? Maybe you have out of date Lua documentation, from before WideClient supported Lua at all? Please check the Download Links subforum. It might be possible to add most if not all of that library to Wideclient. But it isn't a trivial job. much of the one in FSUIPC used existing FSUIPC code. I wioll consider it though. Regards Pete
r2500 Posted January 25, 2011 Author Report Posted January 25, 2011 Unable to let go, I guess. WideClient 6.481 ; Lua Library Reference date Jan 19, 2011. Com library. "com.hidopen(...)" is apparently wrongly documented. I believe it should be "com.openhid(...)". With that change, I can read a GF-46, and after some fuss, determined that writing to the "setFeature" with a leading byte of '3' or '5' allows me to write bit patterns to the displays. So maybe lua can even now handle a remote goFlight module. But writing various bit patterns in the hopes of finding ones that work is at best tedious. Is there any documentation publicly available that details the way to write to the displays? Or maybe some C or lua code that maps ascii to the display segments?
Pete Dowson Posted January 25, 2011 Report Posted January 25, 2011 Lua Library Reference date Jan 19, 2011. Com library. "com.hidopen(...)" is apparently wrongly documented. I believe it should be "com.openhid(...)". Ooops! What a silly mistake! Sorrty -- and thanks! I'll fix that directly. With that change, I can read a GF-46, and after some fuss, determined that writing to the "setFeature" with a leading byte of '3' or '5' allows me to write bit patterns to the displays. So maybe lua can even now handle a remote goFlight module. Yes, using the HID programming facilities you can drive any HID device, once you figure out the protocol. But writing various bit patterns in the hopes of finding ones that work is at best tedious. Is there any documentation publicly available that details the way to write to the displays? No. I've never looked at the HID level stuff for GoFlight, but for other devices I have looked at I have to figure it all out by using a USB monitor program. The one from AGG Software is very good ("Advanced USB Port Monitor", http://www.aggsoft.com/ ). I think you can get a trial period. The documentation which would be useful to you, because it details the GFDev.dll interface, is the GoFlight SDK, from their website. I think that it is likely that the data formats used in that interface are directly reflecting the data in the HID reports. Regards Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now