Jump to content
Sign in to follow this  
joepoway

Aerosoft A320 lua Command Question

Recommended Posts

I'm trying to write a lua function to set the brightness of the 4 main display panels  PFD, ND, ECAMU (ECAM Upper) and ECAML (ECAM Lower) all to 50% but I cannot find what the appropriate LUA script is to do each of these.

I actually don't want to assign an increment and decrement function but rather set all 4 displays to 50% with one assignment.

Can someone help me with what the scripts are need to do this in a function I want to write?

When I run the tracer I see AB_MPL_PFD_Power=12 and so on as I move the dial but am not sure of the format to issue a settings command I tried what I stated with a 50 value but it didn't work.

Thanks in advance

Joe

Edited by joepoway

Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites

Hi Joe

The cockpit display settings use the Lvar you identified and there are functions provided (eg. AB_MPL_PFD_Power_) that control these values - search the Airbus actions.lua file in Editor to find them. The Lvars vary from 0 to 20. It the InitVars() function you will find that the default OnVar is set at 16. You can change this to 12 and call AB_MPL_PFD_Power_on() to set it. Similar functions are provided for ND, ND Radar, ECAMU and ECAML.

To read the LVar you use:
    val = ipc.readLvar("AB_MPL_PFD_Power")
 

and write values (0 to 20) to it using:
        ipc.writeLvar("AB_MPL_PFD_Power", val)

Tip: Place new and modified functions in user.lua file. These are loaded after actions.lua and override existing functions of the same name. 

Edited by ScotFlieger
Tip added.

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

Thanks again for your help!

I found the correct functions and now see the range is 0 to 20 I was unaware of the range. I was able to create the additional custom functions to my user.lua file that I had already made some entries and they work beautifully.

One thing that I haven't figured out how to use repeatedly is the Trace function. When I initiate it with my Aerosoft A320 it displays a quick long list and then nothing else. I'll have to read up on the Trace capabilities a bit so I can use this feature to help me find function names and values more effectively.

Thanks again

Joe 


Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites

Glad you are getting things to work. When using the Tracer it is best to select just one or two variables to follow. Otherwise you will, as your experienced, get a very, very long list. Use pause and resume to provide some control and enable you to see what is happening. Avoid model data that is changing constantly.

When dealing with a Flt Sim (or even a real aircraft) concentrate on outputs you need (normally that displayed) and on inputs (button/knob operations) - the pilot interface. This is the way to control what we need to fly aircraft better. Avoid injecting values deep in the model.


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

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