Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

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

  • Author

Hi Scot

 

thanks for your quick reply. I will wait.

Stefan

regards
Stefan Liebe

  • 7 months later...

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

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
--------------------------------------------------------------------------------------

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.