julietbravo Posted June 27, 2010 Report Posted June 27, 2010 Well I must admit that the lua files for the JS41 and the catalina is the next best thing that could have happened for me personally. To be able to fly without the need to use the mouse is absolute awesome. Now I have just a request. I am looking for a Lua file for the 2 cowlflap switches on the Realair DUKE B60. I have everything mapped to keys or buttons except the cowl flaps. I have emailed rob from Realair and he just told me the cowl flaps is not mapped to standard FSX cowlflaps and thus I cannot use the FSX commands. With the advent of the LUA files I am sure it there is a possibility to have it programmed. Regards JB
julietbravo Posted June 29, 2010 Author Report Posted June 29, 2010 Ok I have found the variables and added then to a Lua file and everything is working perfectly I have created 1 lua file that I use for both left and right, Fully close, half open and full open. -- param nr -- 1 = Cowl flap Close -- 2 = Cowl flap Half -- 3 = Cowl flap Open -- Cowl flap_L_and_R Close if ipcPARAM == 1 then ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_1", 0) ipc.sleep(500) ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_2", 0) -- Cowl flap_L_and_R Half elseif ipcPARAM == 2 then ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_1", 1) ipc.sleep(500) ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_2", 1) -- Cowl flap_L_and_R Open elseif ipcPARAM == 3 then ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_1", 2) ipc.sleep(500) ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_2", 2) end To set the cowl flaps individually split the file up and have only the one line for each engine per file. Anyway for so long it does work with my set-up perfectly. Regards JB
longboard Posted February 13, 2011 Report Posted February 13, 2011 I barely understand any of the programming potential of lua and fsuipc, but i have been able to set up some compound programs for radio and nav rotary encoders because i found a direct example. i would certainly like to figure out how to put your lua cowl flap file to use. i understand it goes into modules folder, but i am totally unclear about how to assign buttons or to name the file even. i love the realair duke but don't enjoy fighting the mouse to adjust the cowl flaps. any help would be greatly appreciated. eric
julietbravo Posted March 15, 2011 Author Report Posted March 15, 2011 I barely understand any of the programming potential of lua and fsuipc, but i have been able to set up some compound programs for radio and nav rotary encoders because i found a direct example. i would certainly like to figure out how to put your lua cowl flap file to use. i understand it goes into modules folder, but i am totally unclear about how to assign buttons or to name the file even. i love the realair duke but don't enjoy fighting the mouse to adjust the cowl flaps. any help would be greatly appreciated. eric You do know that you need a registered version of FSUIPC to make these files work here you will find the guide how to install lua files If you still do not get it right, you can use the private message function and send me a PM with your email address and I will send you the files and the step by step guide to help you.
Delta14Sierra Posted April 12, 2011 Report Posted April 12, 2011 Ok I have found the variables and added then to a Lua file and everything is working perfectly I have created 1 lua file that I use for both left and right, Fully close, half open and full open. -- param nr -- 1 = Cowl flap Close -- 2 = Cowl flap Half -- 3 = Cowl flap Open -- Cowl flap_L_and_R Close if ipcPARAM == 1 then ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_1", 0) ipc.sleep(500) ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_2", 0) -- Cowl flap_L_and_R Half elseif ipcPARAM == 2 then ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_1", 1) ipc.sleep(500) ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_2", 1) -- Cowl flap_L_and_R Open elseif ipcPARAM == 3 then ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_1", 2) ipc.sleep(500) ipc.writeLvar("L:Duke_Cowl_Flaps_Switch_2", 2) end To set the cowl flaps individually split the file up and have only the one line for each engine per file. Anyway for so long it does work with my set-up perfectly. Regards JB I have copied code as above and saved it as DukeCowlFlaps.lua. I have placed the file in the Modules folder. I have assigned "Lua DukeCowlFlaps" to a GoFlight GF-P8 button under FSUIPC (registered). However, nothing happens when I press the respective button. Any insight would be most appreciated!
Pete Dowson Posted April 18, 2011 Report Posted April 18, 2011 I have copied code as above and saved it as DukeCowlFlaps.lua. I have placed the file in the Modules folder. I have assigned "Lua DukeCowlFlaps" to a GoFlight GF-P8 button under FSUIPC (registered). However, nothing happens when I press the respective button. Looking at the Lua code it seems you must set the Parameter to 1, 2 or 3 to select the specific function you want it to perform. Did you do that? If you don't enterr the parameter value when assigning the button it will default to 0, and there is no action defined in the Lua program for 0. Regards Pete
Delta14Sierra Posted April 20, 2011 Report Posted April 20, 2011 Looking at the Lua code it seems you must set the Parameter to 1, 2 or 3 to select the specific function you want it to perform. Did you do that? If you don't enterr the parameter value when assigning the button it will default to 0, and there is no action defined in the Lua program for 0. Regards Pete I figured that out on my own before I got back to your response. However, I do appreciate your kind direction. I am still taking baby steps in learning Lua code, but I am learning a lot each step I take. Thank you so much for your help!
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