Jump to content
Sign in to follow this  
Norman West

ipc.writeLvar function

Recommended Posts

Hi all, I am hoping there is someone out there who can help me, I am new to Linda and I am just trying to get to grips with LUA scripting so far with no luck at all. I am fine assigning fsx default buttons, but I have built myself an autopilot panel based on the Turbine Duke KFC225 auto pilot. most of the inputs are FSX default but there are three buttons that are not. I have extracted, using the Linda tracer, the following information, that appears when the VS button is pressed, what this button does when pressed with the mouse is to display the vertical speed for about 3 seconds and then reverts back to displaying the altitude.

 

 

-- Duke Auto pilot
-- Press Vert speed button

 [L] LVar: Alt_VS_Display_Toggle = 1
LUA.0:  [L] LVar: ApVsButAnt = 1
LUA.0:  [L] LVar: ApVsBut = 1
LUA.0:  [L] LVar: SoftkeypressSound = 1
LUA.0:  [L] LVar: VS_Click_Time = 63581841758.93
LUA.0:  [L] LVar: SoftkeypressSound = 0
LUA.0:  [L] LVar: Alt_VS_Display_Toggle = 0
 

I have written the function below but when I assign it to a button it does nothing, I would really appreciate some pointers on this as I have tried quite a few different ipc.writeLvar() assigns with absolutely no success at all, so I am obviously not doing it right.

 

Function NCCW_KFC225_Ap_Vert_Speed_Button()

      ipc.writeLvar("L:Alt_VS_Display_Toggle",1)

end 

 

Thanks

 

Norman West

 

Share this post


Link to post
Share on other sites

Hi Norman

 

Welcome to the LINDA forum and apologises for the tardy response.

 

Your function looks on the surface that it should work. In which .lua file have you placed it? It should be in actions.lua for the Duke. You say you have located the Lvar using the Tracer. Have you tried injecting the value by toggling the Lvar in Tracer? It is always useful to put some logging statements in the function to test that the function is being called correctly. Use something like _log('VS Display Toggle called...'). Open the Console to see that this message appears when you press the button.


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

Hi Norman,

I currently have the same problem and thus wanted to ask you, whether you ever figured out a lua script that allows to trigger the VS, UP and DN buttons of the Turbine Duke KFC225 auto pilot?

Best regards

Hans

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