A330NEO

Blackbox A330

Recommended Posts

Hi, has anyone already created a script of Blackbox A330? I like to fly this plane very much and want to use a few switches.

Share this post


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

I tried something. But it does not work. What could be the error?

function Batterie_1_on ()
LVarSet = "L:BB_OH_ELEC_BAT1_Lower"
val = 1

if ipc.readLvar(LVarSet) == 1 then
val = 0
end

ipc.writeLvar(LVarSet, val)
end

function Batterie_1_off ()
LVarSet = "L:BB_OH_ELEC_BAT1_Lower"
val = 0

if ipc.readLvar(LVarSet) == 0 then
val = 1
end

ipc.writeLvar(LVarSet, val)
end

 

The switch is unfortunately no function.

 

Share this post


Link to post
Share on other sites

The functions look good syntactically but without access to the aircraft addon I cannot advise on why they are not working. 

The best way to start with any function is to use the Tracer to watch and monitor Lvars and use the toggle facility to see the effect of changing the value. Once you have proven the states that work then is time to write the code. One mistake I keep doing is that the test if/then is in the wrong sense. You should also use the _loggg() (verbose) to output to the console (and FSUIPCX.log) the values of the Lvar you are using at each stage of the function.

Share this post


Link to post
Share on other sites

Hello, when I come with Linda Tracer all the functions comes this:

 

LUA.0:  [L] LVar: BB_XML_EVENT = 118854
LUA.0:  [L] LVar: BB_XML_EVENT = 0
LUA.0:  [L] LVar: BB_OH_ELEC_BAT1_Lower = 1
LUA.0:  [L] LVar: BB_XML_LASTEVENT = 118854
LUA.0:  [L] LVar: BB_XML_LASTEVENT = 0
LUA.0:  [L] LVar: BB_OH_ELEC_BAT1_Lower = 0

 

This is shown to me when I press and release this one button. Can it be that my script so can not function? How do I write my script so it works?

Share this post


Link to post
Share on other sites

Hi A330neo

For anyone to help you would require access to the BB 330 which I do not. The Lvars you listed mean nothing without such access. Without a SDK for the aircraft and a lot of spare time there is no way of offering you support. Sorry.

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