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.

1 simple lua help

Featured Replies

Guys, could some kind soul write a simple lua script here that engages/disengages AP1 in the current FSL AXX (P3Dv5) please?

I'd like to use it then in FSUIPC so that I could assign 2 joystick buttons to FSL AP1 On and FSL AP1 Off  (the joystick buttons will actually be generated by a voiceattack command).

 Many thanks!

Edited by Dirk98

You will find the LINDA FSL A3XX v1.6 includes a function VC_GSLD_FCU_AP1 that toggles the AP1 on/off. This can be assigned within LINDA to a button on your joystick. It simulates depressing the AP1 button on the FCU.

During development we found that it is not possible to read the state of the autopilot. Without this information it is not possible to write separate LUA functions to turn the AP on and off. 

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

  • Author
6 hours ago, ScotFlieger said:

You will find the LINDA FSL A3XX v1.6 includes a function VC_GSLD_FCU_AP1 that toggles the AP1 on/off. This can be assigned within LINDA to a button on your joystick. It simulates depressing the AP1 button on the FCU.

During development we found that it is not possible to read the state of the autopilot. Without this information it is not possible to write separate LUA functions to turn the AP on and off. 

Andrew, I found that function right away in Linda, but I didn't know how to make it visible in FSUIPC. I wanted to assign a voice command via VJoy plugin to this functionality in FSUIPC. But I have no idea how to make this function appear in the FSUIPC dropdown facilities list. 

Thank you.

 

If the voice command is triggering a VJoy button press then LINDA should see it and be able to call any assigned function. Open the joysticks page and see what happens when to issue the voice command. It should highlight the button line you have used. If so then assign the function to the OnPress on that button. This would be much easier than trying to go directly through FSUIPC.  

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

  • Author
5 minutes ago, ScotFlieger said:

If the voice command is triggering a VJoy button press then LINDA should see it and be able to call any assigned function. Open the joysticks page and see what happens when to issue the voice command. It should highlight the button line you have used. If so then assign the function to the OnPress on that button. This would be much easier than trying to go directly through FSUIPC.  

True! I should have known better after so many years with vrinsight mcp and fcu. 

One more question: Linda still can't see GoFlight buttons and rotaries (unlike fsuipc), can it?

Thanks.

I'm happy to have helped.

No, LINDA can not handle GoFlight equipment. You need the GoFlight modules for these to work.

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

  • Author
12 hours ago, ScotFlieger said:

You will find the LINDA FSL A3XX v1.6 includes a function VC_GSLD_FCU_AP1 that toggles the AP1 on/off. This can be assigned within LINDA to a button on your joystick. It simulates depressing the AP1 button on the FCU.

During development we found that it is not possible to read the state of the autopilot. Without this information it is not possible to write separate LUA functions to turn the AP on and off. 

Andrew, sorry for asking again, but it's like a conundrum for my uneducated mind. What would be the script for this lua? I've figured out how to use it in FSUIPC with <custom Control> number 66587 (rotor_brake): AP1 parameter 71190, but I'm really curious to see what would be the simplest lua script for the same function? When you have a minute please share your knowledge.

Much thanks. 

I am sorry but I have never used LUA scripts (as I use LINDA) and could not start to advise you on how to do it.

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

  • Author

Turns out not really rocket sience, all it takes put that script in a blank lua file:

ipc.control(66587, 71190)
DspShow ("AP1", "")

Taken from your actions.lua btw, just replaced FSL by 66587 custom Control, and that was also specified in your actions.lua for FSLabs A3XX. Tested and assigned Ok. ))

Might be helpful if you want to use hardware not recognized by LINDA, like GoFlight.

Thanks.

Edited by Dirk98

Well done. You don’t need the DspShow() if you don’t have a VRi MCP panel.

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

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.