Jump to content
Sign in to follow this  
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

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.


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

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.


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

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...