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.

New Aircraft Module

Featured Replies

I am trying to create a module for an Airbus to run from my Combi 2. I have created a basic module by copying the RealAir Duke module and many controls work OK. I am a bit lost with all the info available

as to how to assign other functions. As an example I want to be able to operate the cockpit button which displays WPT on the EFIS map display. I have used the tracer and found a LVar which when clicked from the list with toggle set to 0 and 1, operates the button. In the editor I have added a section to the lua as follows:-

function Show_WPT_on ()

LVar = "ND_WPT = 0"

end

 

function Show_WPT_off ()

LVar = " ND_WPT = 1"

end

Syntax reported OK

Have saved file, assigned the function to the combi but there is no reaction from the aircraft.

The process is probably not as simple as this but I thought that if I could tackle one control, I might have a chance of working out some of the others.

Thanks,

Richard Halton

Hello Richard,

 

the code is wrong. These are basics, hard to explain. You have to lookup how LUA language is working.

 

Your function (assuming the LUA variables are correct) should be instead

 

function Show_WPT_off ()
ipc.writeLvar = ("ND_WPT", 1)
end

(this is out of my brain, so not tested and hopefully no typo)

 

 

As you have a MCP Combo. there would be an improvment to make an "announcement" on the display:

 

function Show_WPT_off ()
ipc.writeLvar = ("ND_WPT", 1)
DspShow("WPT", "off")
end

 

 

hope this helps to start getting into LUA.

And very important: LUA is case sensitive!!!

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

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

  • Author

Hi,

I have entered the following :-

function Show_WPT_off ()

ipc.writeLVar("ND_WPT", 0)

end

function Show_WPT_on ()

ipc.writeLVar("ND_WPT", 1)

end

function Show_WPT_toggle ()

if _t("ND_WPT", 1) then

Show_WPT_on ()

else

Show_WPT_off ()

end

Syntax reported OK - file saved - button allocated on combi and saved.

The button is operated OK in FSX from the list in the tracer but not from the combi itself.

There are no error messages in the Linda console

Where do I go from here?

Thanks,

Richard Halton

I doubt it is working

 

ipc.writeLVar("ND_WPT", 0)

 

LVar is wrong, Lvar would be right ...

 

You have to get an error from the LINDA console!?

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

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

  • 2 weeks later...
  • Author

Using Lvar solved the problem. I have most of the buttons assigned now. About to start on some of the rotaries. I will look at some of the existing modules for advice. Thanks for your help.

Richard Halton

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.