Jump to content
Sign in to follow this  
maggsy63

Aerosoft A*** AB_FIRE_APU_TEST

Recommended Posts

I have been working on an OVH panel and would like to add  test buttons of APU, ENG1 and ENG2 the key assignment does not appear listed in the Aerosoft module, how would I create the script so I can assign these buttons on my OVH panel

Regards

Steve

Share this post


Link to post
Share on other sites

Hi Steve

The place to start is to open the LINDA Tracer to identify the LVars used for the buttons you wish to control. After ensuring you have the correct LVars List (click on Reload LVars list) and then type a search string in the filter box (ie. FIRE). Then observing the button/switch you are interested in the cockpit and click on Set Value toggle to see the effect. Some values toggle from 0 to 1, others range from 0 to 100. You can also Watch these LVars by clicking Start and seeing the values on the LINDA Console (set at least to Verbose). Try clicking on the button/switch in the cockpit and note the values.

You will need to create any new functions in the users.lua file (in /modules/linda/aircrafts/aerosoft airbus/). The Aerosoft Airbus does not implement all buttons and switches unlike the FSLabs A320X.

Once you have the information, I would start by finding a function that results in a similar action in actions.lua. Copy it to users.lua and modify it with the LVars identified. You can test a function by Saving users.lua, entering CTRL+ALT+R (to restart the LUA engine) and then right-clicking on the new function name.

It is very much a trial and error process but you will learn how LINDA and LUA works. 


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 for pointing me in the right direction

 

I did look for and found this in the actions.lua as the closest cockpit function to the fire test buttons on the OVH panel,

function AB_ANN_LIGHTS_TEST_on ()
    ipc.writeLvar("AB_OVH_LIGHTS_ANN_TEST", 1)
    ipc.writeLvar("LightTest", 1)
    LightSwitch ()
    DspShow ("Test", "on")
end

function AB_ANN_LIGHTS_TEST_off ()
    ipc.writeLvar("AB_OVH_LIGHTS_ANN_TEST", 0)
    ipc.writeLvar("LightTest", 0)
    LightSwitch ()
    DspShow ("Test", "off")
end

function AB_ANN_LIGHTS_TEST_toggle ()
 if _tl("AB_OVH_LIGHTS_ANN_TEST", 0) then
       AB_ANN_LIGHTS_TEST_on ()
 else
       AB_ANN_LIGHTS_TEST_off ()
 end
end        

This is my attempt  saved in the user.lua

function AB_FIRE_APU_TEST_toggle ()
 if _tl("AB_FIRE_APU_TEST", 1) then
       AB_FIRE_APU_TEST_on ()
 else
       AB_FIRE_APU_TEST_off ()
 end

function AB_FIRE_ENG1_TEST_toggle ()
 if _tl("AB_FIRE_ENG1_TEST", 1) then
       AB_FIRE_ENG1_TEST_on ()
 else
       AB_FIRE_ENG1_TEST_off ()
 end
end
function AB_FIRE_ENG2_TEST_toggle ()
 if _tl("AB_FIRE_ENG2_TEST", 1) then
       AB_FIRE_ENG2_TEST_on ()
 else
       AB_FIRE_ENG2_TEST_off ()
 end
end

however although it is listed and I can assign  the correct button press to it via my LINDA A2320 module. it does not perform a function within the sim 

I have to admit I am lost and am probably in over my head (well the panel is OVH ;)  )  and with virtually all other functions I wish to assign all covered either by the Aerosoft module or FSX this is a stumbling block.

Although I am still looking for solutions for landing light switch hardware that will allow on off, retract rather the current Toggle function, most switches are on/off/on  or off/on/on but both on's  are the same output via my BU0836X . older car headlight toggle switches are looking like a solution but are not cheap.

Steve

 

Share this post


Link to post
Share on other sites

Hi Steve

You were almost there. You condition test needs to be the opposite to what you had (_tl(lvar), 0) not _tl(lvar), 1). You also need the AB_FIRE_ENG1_TEST_on and _off functions. Another tip is to do one action at a time. Get that working and then copy and amend for the remaining actions. As I said, when developing a new function, you can right-click on the function name to test it works before doing any assignments.

Here's your starter for ten:

function AB_FIRE_ENG1_TEST_on ()
    ipc.writeLvar("AB_FIRE_ENG1_TEST", 1)
    LightSwitch ()
    DspShow ("Fir1", "on")
end

function AB_FIRE_ENG1_TEST_off ()
    ipc.writeLvar("AB_FIRE_ENG1_TEST", 0)
    LightSwitch ()
    DspShow ("Fir1", "off")
end

function AB_FIRE_ENG1_TEST_toggle ()
    if _tl("AB_FIRE_ENG1_TEST", 0) then
        AB_FIRE_ENG1_TEST_on ()
    else
        AB_FIRE_ENG1_TEST_off ()
    end
end

With your 3-position landing light switch problem, you may need to use 2 or 3 inputs on your USB card. Each position would then represent a button for OFF and ON and possibly RETRACT switch positions. A different function (OFF/ON/(RETRACT)) would be assigned to each button OnPress and you may need to assign another function to the OnRelease to cancel the selection. This is how the Saitek switch panel configuration (see release notes for Saitek setup).


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

Cheers for that I amended the lines and using on when pressed and off when released it has a lovely delay and a much better result than using toggle as it often took a couple of cycles to activate the opposite function, where as  "on" press on  and "off"  on release worked perfectly

I have to ask where did you find the FIR1 ? I searched high and low for other references and one for the APU  but ended up trying FIR2 for eng2  and left FIR1 for the APU and they both worked.

 

The 3 way switches will be a harder issue to resolve but its pending 

Thanks again 

Steve

Share this post


Link to post
Share on other sites

I just changed TEST to FIR1 in the DspShow function to make it meaningful when displayed on the MCP. 

 


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