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.

One Button for LVAR and FSX Control

Featured Replies

Hi, folks. I just got the hang of writing basic (very basic : ) Lua scripts for my Carenado Baron panel (homebuilt). I've got every switch of mine working the corresponding button in the sim except for one instrument. The DME Position indicator (below the HSI) sends an FSX Control (Dme_select and parameter or 1 or 2) and an LVar command (DMEPOS 1 or 2). Is it possible to write an Lua command that will do the FSX command and the LVar?  Here's what I have for this section, just need to add the FSX command and not sure how. Thanks for any and all help! -- Dana

 

-- ## DME Position ##
 
function DME_1_Position ()
    ipc.writeLvar("DMEPOS",1)
end
 
function DME_2_Position ()
    ipc.writeLvar("DMEPOS",2)
end
 

Hi KPBG

 

There are 2 means to communicate with an aircraft. Using LVars or, for more basic aircraft, using FSX Controls. The LVar is something set up by the aircraft designer while the FSX Control is defined by Microsoft in the core simulator.

 

If you want to use both calls in your functions then you can. In addition to the ipc.writeLvar use the functions FSXcontrol and FSXcontrolname. FSXcontrol uses the number reference e.g. 66650 and FSXcontrolname uses DME_SELECT. The parameter is added by using a colon e.g. DME_SELECT:1.

 

However, I would caution against using what is the same function using both LVars and FSX Controls. This can lead to conflict. That said, some more sophisticated aircraft add ons do not use the FSX interface fully and it can be necessary to write to both.

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

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.