Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Is it possible to call external dll's from within lua such as you can for the various gfd dll's. In particular I would like to be able to access functions in the PokeysDevice_DLL.dll so that I can control various LED's.

Posted

Is it possible to call external dll's from within lua such as you can for the various gfd dll's.

The GFD (Go Flight Display) library is built in, it isn't external.

In particular I would like to be able to access functions in the PokeysDevice_DLL.dll so that I can control various LED's.

Lua can call external DLL's as Modules provided they have functions written with a Lua interface in mind.

I really can't tell you more that what I can read in the Lua reference manual. There are a number of ready-written external DLLs which will work -- the Lua gd Graphics library, for instance, which i know is already being used for Saitek gauge display modules.

If the DLL you want to use isn't written with Lua access in mind you'd probably need to write your own DLL which acts as a wrapper for it, exposing its functions as Lua functions.

Regards

Pete

  • 2 weeks later...
Posted (edited)

As a followup I just wanted everyone to know that I was able to connect to the PoKeys55T from lua programming. The PoKeys55T DLL is a COM ActiveX enviroment so using a combination of lua5.1.dll and luacom.dll you can create an object that can be controlled from within the FSX / FSUIPC /lua program.

Here as a sample of an lua I created that monitors the status of the landing gear and than turns the correct LED on or off.

fsx_pokeys.lua.txt

Edited by tlhflfsx
Posted

As a followup I just wanted everyone to know that I was able to connect to the PoKeys55T from lua programming. The PoKeys55T DLL is a COM ActiveX enviroment so using a combination of lua5.1.dll and luacom.dll you can create an object that can be controlled from within the FSX / FSUIPC /lua program.

Here as a sample of an lua I created that monitors the status of the landing gear and than turns the correct LED on or off.

Brilliant! I didn't know about luacom.

Do you think you could post something on these lines in the User Contributions sub-forum, as a more permanent reference? Messages here tend to scroll off out of sight very quickly!

Thanks,

Pete

  • 2 weeks later...
Posted

Pete,

I uploaded a sample lua into the User Contributions sub-forum that shows how to interface to a poKeys55T / poKeys56U / poKeys56E device in addition to showing how you can use the luacom.dll to communicate between external DLL(s) and lua.

Thanks for such an outstanding product.

Terry

Posted

I uploaded a sample lua into the User Contributions sub-forum that shows how to interface to a poKeys55T / poKeys56U / poKeys56E device in addition to showing how you can use the luacom.dll to communicate between external DLL(s) and lua.

Thanks for such an outstanding product.

And thanks for offering your work for others. It looks very professional!

Best Regards

Pete

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.