Mario DANTAS

Members
  • Content count

    112
  • Joined

  • Last visited

  • Days Won

    1

Mario DANTAS last won the day on January 13 2016

Mario DANTAS had the most liked content!

Community Reputation

3 Neutral

About Mario DANTAS

  • Rank
    Advanced Member
  • Birthday 08/07/1975

Contact Methods

  • MSN
    mario_dantas@hotmail.com
  • Website URL
    http://fstrackr.net
  • Skype
    mariodantas

Profile Information

  • Gender
    Male
  • Location
    France
  • Interests
    Programming for FSUIPC in VB.NET
    Programming in LUA
    Programming in SIOC

Recent Profile Visitors

1,283 profile views
  1. must be replaced with if val == 0 then
  2. You must use == instead of = in if statements to comprare
  3. Thanks for your help Pete, Sorry if I made you waste your time but I'm not the only one in this forum asking you things about FSUIPC system so if you delayed a release about 6 days is not my fault.
  4. Hi Pete, many thanks for your help, I didn't run the test yet, too busy in office tis week but I'm thinking about a thing. Look below require("simFunctions") All the 4 luas running and waiting for the CLOSE event (when triggered) have the above line of code and calls a function inside simFunctions.lua, it works well for many years but you have some time ago add a feature to threat each lua in a separate thread, isn't it related ?
  5. Hi Pete, ok when return from work I'll try with only one script but FYI the 4 lua scripts have all of them an event.sim(CLOSE So to answer one of your questions, yes, the scripts are all 4 waiting for the CLOSE event To quit the sim I use all times the same procedure as described below: ESC key Exit Prepar3D Are you sure you want to quit Prepar3D ???? Click YES That's all I log my lua separately and for each of 4 luas log I have at the end <<Thread forced Exit>> where before updating the sim I had my ipc.log saying "Closing program:" .. myProg myFunc is about a function that runs a looping ext.kill(oPrgHandler[nIndex]) until the last nIndex where oPrgHandler[nIndex] contails the programs opened by ext.run when launching the sim, with different nIndex of course. Anyway I'll try with one script tonight Pete and many thanks for your help.
  6. Those 4 lua scripts have event.sim(CLOSE, "myFunction") argument and a myFunction function of course
  7. Hi Pete, please see below, the lua script are killed and no close event is running 80046 Plug-in thread table check: 80046 1: Okay: "C:\P3DV3\Modules\settings.lua" 80046 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80046 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80046 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80062 Plug-in thread table check: 80062 1: Okay: "C:\P3DV3\Modules\settings.lua" 80062 2: Okay: "C:\P3DV3\Modules\initPrograms.lua" 80062 3: Okay: "C:\P3DV3\Modules\readytoflyPrograms.lua" 80062 4: Okay: "C:\P3DV3\Modules\pmd737sim.lua" 80078 Advanced Weather Interface Enabled 80218 Saving Flight "PMD737" (Descr "") 80265 Ext: Starting "C:\PMD737SIM\SayStatic.exe" 87359 Memory in use: 1707Mb, Avail=2389Mb, MaxFreeBlock=2030Mb 128671 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 128671 Sim stopped: average frame rate for last 61 secs = 15.6 fps 128671 Max AI traffic was 0 aircraft 149328 === DLLStop called ... 149328 === Closing external processes we started ... 149328 === Getting Lua plug-ins to close ... 169828 === About to kill any Lua plug-ins still running ... 169984 Lua threads being terminated: 169984 1 = "C:\P3DV3\Modules\settings.lua" 170125 LUA: "C:\P3DV3\Modules\settings.lua": killed 170125 2 = "C:\P3DV3\Modules\initPrograms.lua" 170281 LUA: "C:\P3DV3\Modules\initPrograms.lua": killed 170281 3 = "C:\P3DV3\Modules\readytoflyPrograms.lua" 170437 LUA: "C:\P3DV3\Modules\readytoflyPrograms.lua": killed 170437 4 = "C:\P3DV3\Modules\pmd737sim.lua" 170593 LUA: "C:\P3DV3\Modules\pmd737sim.lua": killed 170593 === Closing global Lua thread 172593 === About to kill my timers ... 172796 === Restoring window procs ... 172796 === Unloading libraries ... 172796 === stopping other threads ... 172796 === ... Button scanning ... 172890 === ... Axis scanning ... 172984 === Releasing joystick devices ... 172984 === Freeing macro memory 172984 === Removing any offset overrides 172984 === Closing all WideFS threads 175406 === Clearing any displays left 175406 === Calling SimConnect_Close ... 176015 === SimConnect_Close done! 176015 === AI slots deleted! 176015 === Freeing button memory ... 176015 === Closing my Windows ... 176015 === Freeing FS libraries ... 177015 === Closing devices ... 177015 === Closing the Log ... Bye Bye! ... 177015 System time = 19/02/2017 19:30:31, Simulator time = 19:29:04 (18:29Z) 177015 *** FSUIPC log file being closed Minimum frame rate was 11.6 fps, Maximum was 29.5 fps Minimum available memory recorded was 2311Mb Average frame rate for running time of 61 secs = 15.6 fps Maximum AI traffic for session was 0 aircraft Memory managed: 88 Allocs, 87 Freed ********* FSUIPC Log file closed ***********
  8. Hi Pete, I'll work today pon this, will enable debug and logextras to feed this thread with the results.
  9. Hi Pete, thanks for your prompt reply as always the best software support. The script is just waiting for this event.sim The script is a ipcReady.lua launching some applications when sim is ready and then keeps waiting for the sim.event(CLOSE, "closeProcedure") The closeProcedure is a function that kills the programs started before when sim was ready. I have changed also the TimeForLuaClosing value to 5 and even with this no success to execute whatever from that event. P.D. aua668, a cleaning script is what i did with mu function but I want this to be triggered automatically at sim closing, just like before.
  10. Hi fellows (and Pete) Only to say that event.sim(CLOSE, "myFunc") doesn't trigger: I.E. function myFunc() ipc.log("I was triggered from event.sim") end event.sim(CLOSE, "myFunc") The log shows "Thread forced exit" I think the problem comes from P3DV3.4.22 as it works well before the hotfix Cheers
  11. It will be nice to get it over the network. Many thanks Pete
  12. Hi fellows, I have a little question. Does anyone knows the scope of the ipc.get / set functions ?, I mean if I set something in FSUIPC is it available in remote pc using WideFS ??? I.E. PC1 with FSUIPC ipc.set("hello","1") PC2 with WideFS myVar = ipc.get("hello") is myVar == 1 ? or not ? Thanks in advance Mario DANTAS France.
  13. Nothing special Simply FSUIPC check if Precision Flight Controls FSX dynamic link library is present and EPIC also....
  14. Hi folks, here some lua function to operate your pokeys card, only for ethernet version (Pokeys57E) Enjoy --Function: Create a pokeys handle variable --Call: Provide not mandatory 'bDisplayError' as 'false' if don't want to display error -- Otherwise it will be displayed in simulator --Returns: 'nil' if error, otherwise returns a valid handler function createPokeysObject(bDisplayError) local oObj if bDisplayError == nil then bDisplayError = true end oObj = luacom.CreateObject("pokeysDevice_DLL.pokeysDevice") if oObj == nil then ipc.log("POKEYS ERROR - Unable to create the pokeysDevice_DLL object") if bDisplayError == true then ipc.display("POKEYS ERROR - Unable to create the pokeysDevice_DLL object") end end return oObj end --Function: Connect to an ethernet pokeys card --Call: Provide cIP as string i.e. "192.168.1.100" --Returns: 'true' if connection made successfully, otherwise 'false' function connectToPokeys(cIP) local isConnected = oCard:ConnectToNetworkDevice(cIP) if isConnected == false then ipc.log("POKEYS ERROR - Unable to connect to pokeys card at " .. cIP) end return isConnected end --Function: Obtain an IP address from the card serial number --Call: Provide the card serial number as integer --Returns: 'nil' if error or card not found, otherwise returns a valid ip address as string function getPokeysIPAddrFromSN(nSerialNumber) local cIPReturn = nil local oDevices = createPokeysObject() if oDevices == nil then return nil end oDevices:StartEthernetDiscovery() ipc.sleep(1500) oDevices:StopEthernetDiscovery() local iNumDevices = oDevices:GetNumberOfDetectedNetworkDevices() if (iNumDevices > 0) then ipc.log("I've found " .. iNumDevices .. " Pokeys ethernet cards in the network") else ipc.log("No Pokeys ethernet cards found in the network") return nil end local ipAddresses = oDevices:GetNetworkDevicesAddressses() for nCard = 1, iNumDevices do serialNumber = 0 versionMajor = 0 versionMinor = 0 oDevices:ConnectToNetworkDevice(ipAddresses[nCard]) oDevices:GetDeviceIDEx(serialNumber, versionMajor, versionMinor) ipc.log("Card " .. nCard .. ", serial number " .. serialNumber .. ", version major " .. versionMajor .. ", version minor ".. versionMinor) if (serialNumber == nSerialNumber) then ipc.log("Found requested serial number " .. serialNumber .. " with IP address " .. ipAddresses[nCard]) cIPReturn = ipAddresses[nCard] return cIPReturn end oDevices:DisconnectDevice() end if (cIPReturn == nil) then ipc.log("No Pokeys ethernet card found matching the requested serial number " .. nSerialNumber) end return cIPReturn end
  15. Straight answer Pete, LoL