October 30, 20169 yr Hellosorry , I have problem with new version of Linda 2.8.4 when using the editor to design lua sources code, the editor freez and all crashes, Linda crash also.Only one solution : stop processes manually ! Working on Win7 with FSX and Airbus X A319/A3201.31 (last version). I would like to use Linda to design my own interface. My objective is to use Linda to debung my lua programs. I can't do that at this moment because the LINDA Editor Freez juste after loading my lua source program. My program works when loaded Directly by FSUIPC. Thanls for your Help. Regards
October 31, 20169 yr Welcome to the LINDA community and thank you for moving your question to the Support sub-forum. I am sorry to hear that you are experiencing problems with the LINDA Editor freezing. There was a minor change to the Editor to stop it crashing when a right-click was made with text selected. What are you doing in the Editor when it freezes? The more detail of your actions you can provide the quicker I can isolate and fix the problem. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
October 31, 20169 yr Author hello, Thanks for your response The editor Freez just after loading my lua program and after this, nothing !!!! all Eiditor and Linda Freezes. Here is my program (it works when called in ipcready.lua). -- set the pollrate to 200ms = 4 times per secondpollrate = 200handle = com.open("\\\\.\\COM25",9600,0);ipc.log("HANDLE ************")ipc.log(tostring(handle))while 1 do -- You may need to adjust the sleep time for smoothest results ipc.sleep(200) str,n = com.read(handle,4,4,10) ipc.log(tostring(n)) if n == 4 then ipc.log(str) str= string.sub(str, 1,3) variable = tonumber(str) ipc.writeLvar("L:Spoiler_lv_Anim",variable) endend Thanks for Help Regards some complementary informations When Editor and linda Freezes, I kill the process applications but the Lua.exe Still working in the background processes. I need also to kill it in windows processes systems Regards
October 31, 20169 yr Hi Samirrobot Thank you for letting me see the code you were trying to edit. Firstly, the LINDA Editor is designed for editing LINDA modules and functions and not general LUA code. Any code should be enclosed within a function for proper testing and development. Second, your code includes an infinite loop (with "while 1 do") and this is causing LINDA to apparently freeze. It is not frozen, it is just executing your code with no opportunity to break or do anything else. If you place the code inside a function and right click on the function name it will 'freeze'. I had the following to break the infinite loop: m= 5000 while m > 0 do m = m - 1 end Finally, the Lvar (Spoiler_lv-Anim) does not exist for the Airbus. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
October 31, 20169 yr Author Hello, Thanks for your message 1) the Variable Spoiler_lv_Anim exists and It's only this working perfectly. the problem is that all other variables are not compatible with the Xby Wire implemented in the Aerosoft Airbus. So I tested it and t works perfectly with my microcontroller that manages it 2) My question is that how can I init my program if I need to use function ? is existing a default function that is called at the start ? 3) I replaced the While 1 by an Event and it works perfectly I am loading my Lua in the ipcready file but I would like to be able to reload them when I make some correction in the code. At this point I must restart all the simulator when I modify my lua code. Is there any solution to reload the program ? with out restarting du FSX Regards My second problem : when startin FSX, I see Linda starting but ther is no windows accessible ? how can I start the localy started Linda without restarting it by clicking on Linda.exe ? is it the good and the only solution ? Regards
October 31, 20169 yr Author here is my new code version. The problem is that the new aerosoft Airbus X is a problem to manage the Spoilers. I tested all the variables but the only one works is Spoiler_Lv_Anim. This program control the Spoiler by externel microcontroller module (COM overs USB). handle = com.open("\\\\.\\COM25",9600,0);function callbackcom(handle,str,n) if n == 4 then str= string.sub(str, 2,4) variable = tonumber(str)-- ipc.log(tostring(variable)) ipc.writeLvar("L:Spoiler_lv_Anim",variable) ipc.writeUD("9004",variable) endendevent.com(handle,4,4,10,"callbackcom")
October 31, 20169 yr Hi Dealing with your second problem first. LINDA comprises 2 parts: the LUA code and the GUI LINDA.EXE. The first part is started by FSUIPC4. To start the LINDA.EXE automatically you need to run the program, select the Setup LINDA page and tick the Start GUI with Sim checkbox. This will insert the correct lines in the FSUIPC4.ini file. 1. I have no idea what the Lvar is but that does not matter. 2. LINDA is event driven with a 1 Hz, 2 Hz and 10 Hz timers through the event.lua module. If you wish to call your function, you need to edit event.lua and place your function call at around line 46. If you plan to have several different functions you may wish to consider creating a handler function which calls each of your other functions. Please note that this file is always updated with a new version release. You should place your function in user.lua for it to work probably with LINDA. Any edits you do should be followed by clicking on 'Reload LUA Engine'. 3. Glad you got the infinite loop sorted. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
October 31, 20169 yr Author Thanks very much for your response. Here is the contain of my envent.lua file : module(..., package.seeall);function button () a = a endfunction com () a = a endfunction control () a = a endfunction flag () a = a endfunction gfd () a = a endfunction intercept () a = a endfunction key () a = a endfunction offset () a = a endfunction param () a = a endfunction sim () a = a endfunction timer () a = a endfunction vriread () a = a endfunction cancel () a = a endfunction terminate () a = a end I don't understand what it mean and don't know where I adde my répetitive function ? Regards
October 31, 20169 yr Author hello, Can't find where executing my program When executed in ipcready.lua I added : ipc.runlua('E:\MS_FlightSim_X\Modules\old_ipcready') it works. But know Where can I add it in my config to execute it only when opening my plane. I created a config and generated to me some lua files. I can"t find the periodic caller to execute my other functions to refresh the buttons to the microcontroller. My question is, How can I make the Handler variable of my COM port to be global ? Am sorry, I think am not good but I can't find what you explained about periodic calls. Need Help Regards
Archived
This topic is now archived and is closed to further replies.