Sign in to follow this  
Stefan01

How to assign a function from user.lua to MCP Combo knob?

Recommended Posts

Hi all,

 

Linda 2.6.3

 

I have written some functions in the user.lua of my PMDG777 and placed it in the PMDG777 folder.

When I load the aircraft I see in the tracer the message “User´s modification script is loaded”.

When I go in LINDA Gui to MCP Combo and right click on a line where I can assign a function to a knob or button I cannot find the functions I have defined in the user.lua.

For example I added to user.lua the following lines:

 

function TCAS_MODE_CYC ()
                i = ipc.readLvar("switch_749_a")

                if i == 0 then
                   TCAS_MODE_alt ()
                elseif i == 10 then
                    TCAS_MODE_xpndr ()
                elseif i == 20 then
           TCAS_MODE_TA ()
                elseif i == 20 then
           TCAS_MODE_TA ()
                elseif i == 30 then
           TCAS_MODE_TARA ()
                elseif i == 40 then
           TCAS_MODE_stby ()
                 end
end

 

What can I do to show the function "TCAS_MODE_CYC" in the Linda GUI to asign it to a button  like the functions in the Lib :Default FSX other Lib´s ….. or from PMDG 777 written in the actions.lua

In the past I have written the additional tasks in the actions.lua and I presume that in that case the functions where written in the file PMDG 777-Functions.txt. In that case I could see the functions and asign them to buttons.

Now I have removed all the selfmade functions from action.lua and written them to user.lua

Do I have to writte something similar for the user.lua for example User-Functions.txt or what can I do?

Is a manual for this available?

 

Thanks a lot for help

Stefan

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Stefan

 

You raise a very good point. I will need to investigate why the user.lua functions are not listed in the pop up menu so they can be assigned. It will be a week or so before I can do so.

 

In the meantime, can I suggest you place your functions in lib-user.lau which you will find in \linda\system\libs.

Share this post


Link to post
Share on other sites

Hi Scot,

 

Do you find a solution for that matter ?

 

In fact, I can edit manually cfg file with my own functions and it works but in the GUI I can't find them.

 

Thanks

Share this post


Link to post
Share on other sites

Isn't the user.lua just meant to add addon specific functions regarding the LINDA autosave feature? 

Share this post


Link to post
Share on other sites

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
Sign in to follow this