October 30, 201510 yr 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 = 1LUA.0: [L] LVar: ApVsButAnt = 1LUA.0: [L] LVar: ApVsBut = 1LUA.0: [L] LVar: SoftkeypressSound = 1LUA.0: [L] LVar: VS_Click_Time = 63581841758.93LUA.0: [L] LVar: SoftkeypressSound = 0LUA.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
November 18, 201510 yr 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
April 19, 20179 yr 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.