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.

ipc.writeLvar function

Featured Replies

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

 

  • 3 weeks later...

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

  • 1 year later...

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

Archived

This topic is now archived and is closed to further replies.

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.