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.

Problems creating Functions for Wilco EMB 170

Featured Replies

Hi.I'm trying to create some LUA code for the Wilco Embraer 170 that toggles the Engines on/off. I have obtained the Lvars from the LINDA tracer, however the Lvars for the engines do not appear to read or write.The code I have is as follows for Engine 1:function Engine1_Toggle () buffer = ipc.readLvar("L:EmbStarterL") if buffer == 0 then ipc.writeLvar("L:EmbStarterLCover", 1) ipc.writeLvar("L:EmbStarterL", 2) ipc.writeLvar("L:EmbStarterL", 1) ipc.control(66300, 0) ipc.control(65983, 0) ipc.control(66363, 0) ipc.writeLvar("L:EmbStarterCover", 0) else ipc.writeLvar("L:EmbStarterLCover", 1) ipc.writeLvar("L:EmbStarterL", 0) ipc.control(65987, 0) ipc.control(66363, 0) ipc.writeLvar("L:EmbStarterLCover", 0) endendThe ipc.controls I have included in the code work fine. Does anybody know the reason why the Lvars won't read or write?On occasion the starter knob on the panel will flicker back and forth, but nothing happens.Any help would be appreciated.Regards,Chris

Hi Chris,I do not have the Wilco EMB's so I'm just guessing.What happens, if you trace e.g. EmbStarterLCover?You click the cover in the VC and the LINDA Tracer gives you this LUA back? But no numbers (parameters)?Have you tried to test the Lvars with the LINDA tracer (set value and toggle it)?(just to be sure there's no issue with your code)And inserted as aparemters not just 0 and 1, but also 0 and 100?However, every developer is different and to get a Lvar does not mean, that everything is fine unfortunately ...

Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

  • Author

Thanks for the reply Guenter and the suggestion of using the Tracer to toggle parameters. I also found I was using some of the wrong Lvars to do the job!I've got it working with the following code:function Engine1_Toggle () buffer = ipc.readLvar("L:EmbStarterL") if buffer == 0 then ipc.writeLvar("L:EmbStarterLCoverClick", 1) ipc.writeLvar("L:EmbStarterLClick", 1) ipc.writeLvar("L:EmbStarterLClick", 1) ipc.sleep(1250) ipc.writeLvar("L:EmbStarterLCoverClick", -1) else ipc.writeLvar("L:EmbStarterLCoverClick", 1) ipc.writeLvar("L:EmbStarterLClick", -1) ipc.sleep(1250) ipc.writeLvar("L:EmbStarterLCoverClick", -1) endendCheers,Chris

Create an account or sign in to comment

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.