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.

Beginners Problems - Writing Offsets with Lvars in LINDA

Featured Replies

Hello Guys,
 
first, i want to say sorry because of my bad english... I am from germany, so i hope you will forgive me and understand anyway. I guess, for experienced developer, my problem is very easy to solve, but i am beginner here, and dont really know, where is my failure, that my experiment does not work.
 
First to know, i am working with the Aerosoft Airbus. There i want to learn, how to build Cockpit Elements. I made it work, to use a button with an Arduino Board, that made an action in Flight Simulator. Now i want to build a Light, for Example my APU Master Button Light. Here i wrote this Code:
 

	if ipc.readLvar("L:AB_OVH_APU_MASTER") == 1 then
        ipc.writeUB(0x565D, 1)
	else
        ipc.writeUB(0x565D, 0)
	end 

I wrote this in the "Timer" Funktion of the System Funktions in the Aerosoft Airbus actions.lua file. But there is no reaction on my Offset, when i change the LVars. The other way, to change Lvars with Offsets works good, so i made it working to use Buttons. But i want to get visual Feedbacks on my Cockpit Parts.

 

So maybe you know, whats going wrong there.

 

I hope you have the answers :)

 

 

 

Greetings 

 

Phil

  • Author

Nobody here, who can help me with my question?  :sad:

  • 2 weeks later...

I am also a new person to Linda. But I will try to help.

 

First is a question: are you sure that you are executing the code above? The Linda Trace function can help determine if your activities actually reach that code. Without observing the other code (is it a Lua in Linda?) it is hard to determine what went wrong).

 

Also, I cannot find a FSUIPC offset 565D. Is that an offset for the Airbus. Usually other established offsets outside FSUIPC are above 5000. There is a list of FSUIPC offsets in the FSUIPC for Programmers.pfd in the FSUIPC SDK folder.

 

Good Luck - your English is 100 times better than my German.

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.