Search the Community
Showing results for tags 'luacom'.
Found 1 result
-
Hi i am a bit disapointed because i am fully stopped in Home cockpit advancement due to an error i can't explain i made the choice to use Linda & Lua script for with Fsuipc for 3 reasons first i already use Linda programming tools for my Saitek and Vrinsight MCP and i am clearly happy with the result secundly ; i discovered with standard Linda Script the capabilities of Lua programming third , i want to use a pokey56u card instead of using OC cards & IOCP/SIOC programming solution because the pokey card could be used by Linda and Lua as i understand , the pokey 56U could be interfaced with Linda Lua truth 3 Dll , the Lua5.1.dll in the P3d Root folder, the Luacom.dll in Modules\Lua folder and it pokeysdevice_dll.dll in Lua folder too i resused a part of a Lua script (written iniatially by Terry Hall who seems 3 years ago satisfied with this solution) , named it Lib-Zpokey56u01, stored in the Modues\linda\libs folder to be called by the lua script opening in sequence all lib-*.lua files no issue on that except that the lib-zpokey56u01.lua script generate an error LUA.1: [iNIT] Loading... LUA.1: Aircraft: Carenado A36 Bonanza 60th Anniversa LUA.1: Aircraft module detected: FSX Default LUA.0: AivlaSoft library loaded... LUA.0: FSX standard library loaded... LUA.0: IVAO library loaded... LUA.0: RealityXP library loaded... LUA.0: Weather library loaded... [E] *** LUA Error: error loading module 'luacom' from file 'D:\Prepar3d V2\modules\lua\luacom.dll': Le module spécifié est introuvable. (required module not found) Advanced Weather Interface Enabled the script start by a require "luacom" (to load the luacom.dll) which seems generating the error , i don't know why because "require" command search the dll file in the appropriate folder as you could see in error message i thank that i had not the security rights to read or open the luacom.dll or Prepar3d V2 Folder under my Login but security properties show me that i have the Full security control of Dll file and all p3d folder so i am very perplex about the cause of issue i post the script below THierry I7-950 3.07Ghz OC 3.71Ghz on a MB Asus Rampage Extreme II /12 Gb mem / Nvidia 660 TI 2 Gb / OS Windows 8 Pro 64 bit & P3D V2 on SSD disk / 2 monitor 26" -- ================================================================================= -- Initial Setup -- ================================================================================= require "luacom" poKeys = luacom.CreateObject("PoKeysDevice_DLL.PoKeysDevice") ipc.runlua('Linda\\lua\\ipcDebug') if poKeys == nil then ipc.log("Error: Unable to create PoKeysDevice_DLL object") ipc.display("Error: Unable to create PoKeysDevice_DLL object") ipc.exit() end if poKeys ~= nil then ipc.log("Success: Able to create PoKeysDevice_DLL object") ipc.display("Success: Able to create PoKeysDevice_DLL object") end -- ================================================================================= -- check current physical switch setting and update FSX software switch to match -- ================================================================================= function fsx_setup() ipc.log("FSX_Setup Script started") ipc.display("FSX_Setup Script started") if ipc.testbutton(10,0) == true then ipc.writeUD(0x281C, 1) -- set FSX battery switch ON else ipc.writeUD(0x281C, 0) -- set FSX battery switch OFF end if ipc.testbutton(10,0) == true then -- physical switch in ON if ipc.readUD(0x281C) == 0 then -- FSX switch is Off ipc.control(66241) -- toggle FSX switch to ON end else -- physical switch in OFF if ipc.readUD(0x281C) == 1 then -- FSX switch is On ipc.control(66241) -- toggle FSX switch to OFF end end chk_pin_10 = false chk_pin_10, onoff_pin_10 = poKeys:GetInput(10) if (chk_pin_10 == false) then -- GetInput Failed... Most likely not configured properly -- Put code here to perform for failure else -- We got results from the switch GetInput Function if (onoff_pin_10 == true) then -- Switch at Pin 10 is ON -- Put code here you wish FSX to perform ipc.writeUD(0x281C, 1) -- set FSX battery switch ON else if (onoff_pin_10 == false) then -- Switch at Pin 10 is OFF -- Put code here you wish FSX to perform ipc.writeUD(0x281C, 0) -- set FSX battery switch OFF else -- Could not determine status of Switch at Pin 10 -- Put code here you wish FSX to perform end end end -- chk_pin_10 -- ======================================= -- Check Switch Position Connect to Pin 10 -- ======================================= chk_pin_10 = false chk_pin_10, onoff_pin_10 = poKeys:GetInput(9) if (chk_pin_10 == false) then -- GetInput Failed... Most likely not configured properly -- Put code here to perform for failure else -- We got results from the switch GetInput Function if (onoff_pin_10 == true) then -- Switch at Pin 10 is ON -- Put code here you wish FSX to perform ipc.writeUD(0x281C, 1) -- set FSX battery switch ON else if (onoff_pin_10 == false) then -- Switch at Pin 10 is OFF -- Put code here you wish FSX to perform ipc.writeUD(0x281C, 0) -- set FSX battery switch OFF else -- Could not determine status of Switch at Pin 10 -- Put code here you wish FSX to perform end end end -- chk_pin_10 end -- check_switches -- ================================================================================= -- Initial Script Startup -- ================================================================================= connect_usb = true -- true = USB / false = ethernet if (connect_usb == true) then -- Get Number of poKeys Devices Found no_devices = poKeys:EnumerateDevices() -- Connect to Device if (num_devices ~= 0) then connect_flag = poKeys:ConnectToDevice(0) if(connect_flag == false)then -- code to perform if ConnectToDevice fails ipc.log("Error connecting to poKeys USB Device 1") ipc.Display("Error connecting to poKeys USB Device 1") ipc.exit() end if(connect_flag == true)then ipc.log("Pokey56U01 mounted") ipc.display("Pokey56U01 mounted") end end else connect_to_ethernet() end ipc.log("FSX_Setup Lua Script Called") ipc.display("FSX_Setup Lua Script Called") fsx_setup() -- check physical switch and configure fsx software switch -- ================================================================================= -- Event Section -- ================================================================================= -- Gear up / down event event.timer(100,"check_switches") sorry everybody , i forgot Thanks for your idea or help
- 2 replies
-
- luacom
- luacom.dll
-
(and 2 more)
Tagged with: