Sign in to follow this  
Petraeus

BlackBox Airbus

Recommended Posts

Help AVSIM continue to serve you!
Please donate today!

Hi Petraeus

 

That looks a very comprehensive list of variables. As I read it only the first 2 blocks are read only. The rest appear to be read/write. You can use the Linda tracer to test reading and setting them to test this. I would then suggest that the Aerosoft Airbus module could be adapted to implement the same for Blackbox.

Share this post


Link to post
Share on other sites

Hi ScotFlieger

 

All the variables are read-only except for BB_XML_EVENT. Writing different codes to BB_XML_EVENT causes the various actions to take place, and these are intended to be triggered by the values set in the corresponding variable. As such the syntax is rather different from that in the current Aerosoft Airbus code.

 

If someone could write an example of 'test a variable / set corresponding code in BB_XML_EVENT' code, I could have a go at replicating it, but my LUA coding knowledge is limited.

Share this post


Link to post
Share on other sites

Have you sought clarification from Black Box as to why only BB_XML_EVENT is read/write and how it is surpassed to be used?

Share this post


Link to post
Share on other sites

No I haven't. It's just my reading of:

 

All variables are FSIM L Vars and should be accessed as follows examples      

READ (L:BB_ECAM_LED_BLEED) 1 == as a comparison to turn on a hardware LED etc  

WRITE  0x1C016 (>L:BB_XML_EVENT)   

with 0x1C016 being the event code to send ( See next sheet for full events list )

   

The actual codes to be written to BB_XML_EVENT are on the 'Full Events List' page of the spreadsheet - I hadn't spotted that first time round.

Share this post


Link to post
Share on other sites

Hi Petraeus

 

I missed that too.  What you need to do is to embedded the L:BB_XML_EVENT inside functions in LINDA to hide this strange write method.  I would start by using the _lib_user.lau to test some simple reads and writes using the method given by Blackbox (e.g. reading and setting a light such as KEY_BB_OH_SW_STROBE_INC (0x1d0C0) and KEY_BB_OH_SW_STROBE_DEC (0x1d0C1)).

 

You need to write a function that switches the strobe lights on and off.  It will look a bit like this but you will need to experiment:

 

function BB_OH_SW_STROBE_on ()

   ipc.writeLvar ('L:BB_XML_EVENT', 0x1d0C0)

end

 

function BB_OH_SW_STROBE_off ()

  ipc.writeLvar (L:BB_XML_EVENT', 0x1d0C1)

end

 

You can test these by allocating these functions to 2 convenient buttons on your joystick.

 

Once you have the method working, I suggest you start by making a copy of the Aerosoft Airbus X folder in \modules\linda\aircraft and renaming it to Blackbox Airbus.  You can then use LINDA's editor to incorporate what you have learnt into the functions contained in \modules\linda\aircraft\actions/lua.  It already implements most of the switches in the cockpit. 

Share this post


Link to post
Share on other sites

Good news Petraeus.

 

I had a thought off how to make your task easier to read.  I would create a complete list of variables using the BB_ name and assign the appropriate hex code to each one.

 

eg. Lvar_BB_OH_SW_STROBE_on = 0x1d0C0

 

You should be able to cut and paste this from the spreadsheet. Then you can refer to the variable in your code and know that if it reads in english then you have the correct value for the BBB_XML_EVENT.

 

Remember LINDA/Lua is case sensitive.

Share this post


Link to post
Share on other sites

Hi Patraeus

 

Would be delighted if you would kindly share any module for the Black Box Airbus as I really enjoyed flying them but am unable to use them with my VRinsight MCP 

 

Thanks

 

Bruce

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