Jump to content
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


regards
Stefan Liebe

Share this post


Link to post
Share on other sites

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.


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

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? 


Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...