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.

Can i setup 1 switch toggle 2 functions in LINDA

Featured Replies

for example,i put a switch from postion up to down on my warthog throttle,in NGXu,both air condition pack can trun on or trun off at the same time.

in default situation,1 switch can mapping 1 function only.how to 1 switch maping 2 functions?

sorry for my poor english.i hope someone can understand me:)

You can easily combine 2 or more existing functions into one. In the aircraft folder (/linda/aircrafts/pmdg 737NGXu) you will find a actions.lua and a user.lua file. You need to edit the user.lua. You can do this by loading the aircraft and clicking Edit next to the aircraft selector. Then click Edit User button.

I recommend you first study the existing module code in actions.lua. This can be opened by clicking Edit Actions in the Edit Aircraft Module page. Search for NGX_PACK. You will see several functions relating to the left and right packs. You do not need to understand the internal operation, just note the function names. LUA treats all function names as case sensitive - they must be written as is.

Add following code to user.lua:

function NGX_PACK_both_high()

      NGX_PACK_L_high()

      NGX_PACK_R_high()

end

function NGX_PACK_both_off()

      NGX_PACK_L_off()

      NGX_PACK_R_off()

end

function NGX_PACK_both_toggle()     

NGX_PACK_both_high()

      If ipc.readLvar('switch_200_73X')  ~= 100 then

              NGX_both_high()

      else

             NGX_PACK_both_off()

      end

end

After saving the modified user.lua you can test your new functions by right-clicking on the function name in the LINDA Editor.

I hope this is understandable.

Edited by ScotFlieger

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
On 10/28/2020 at 7:40 PM, ScotFlieger said:

You can easily combine 2 or more existing functions into one. In the aircraft folder (/linda/aircrafts/pmdg 737NGXu) you will find a actions.lua and a user.lua file. You need to edit the user.lua. You can do this by loading the aircraft and clicking Edit next to the aircraft selector. Then click Edit User button.

I recommend you first study the existing module code in actions.lua. This can be opened by clicking Edit Actions in the Edit Aircraft Module page. Search for NGX_PACK. You will see several functions relating to the left and right packs. You do not need to understand the internal operation, just note the function names. LUA treats all function names as case sensitive - they must be written as is.

Add following code to user.lua:

function NGX_PACK_both_high()

      NGX_PACK_L_high()

      NGX_PACK_R_high()

end

function NGX_PACK_both_off()

      NGX_PACK_L_off()

      NGX_PACK_R_off()

end

function NGX_PACK_both_toggle()     

NGX_PACK_both_high()

      If ipc.readLvar('switch_200_73X')  ~= 100 then

              NGX_both_high()

      else

             NGX_PACK_both_off()

      end

end

After saving the modified user.lua you can test your new functions by right-clicking on the function name in the LINDA Editor.

I hope this is understandable.

thanks for your reply.i follow your word to edit my user.lua.it is worked perfectly.

i try to study actions.lua,but it is too difficult for me.i found a lot of functions,most of them is "ON,OFF,TOGGLE".i can understand what they mean.but another one is "SHOW",i set one switch to NGX_PACK_L_show,but when i operate the switch,it does not any change in my P3D.what does the "SHOW" means?when do i use the "SHOW" function?

With LINDA modules we try to use standard naming for most operations if possible. What the code in each function does can be ignored by most users.

These are the self-explanatory _on, _off and _toggle together with _high, _low, etc where there are specific switch/knob positions.

Other relate to LINDA original aim of supporting the VRInsight Combo panels. These _inc, _incfast, _dec and _decfast for the way the Combo knobs are actioned and _show to give information on the panel display.

 

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

Archived

This topic is now archived and is closed to further replies.

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.