Sign in to follow this  

Beginners Problems - Writing Offsets with Lvars in LINDA

Recommended Posts

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)
        ipc.writeUB(0x565D, 0)

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 :)







Share this post

Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this