Baron B59 REP dataref substitutions

Support for Air Player desktop.

Moderators: russ, Ralph

Post Reply
Message
Author
Maverickman
Posts: 5
Joined: Fri Dec 22, 2017 10:33 am

Baron B59 REP dataref substitutions

#1 Post by Maverickman »

I am tying to substitute the datarefs in the instrument scripts for some of the instruments (temps/pressure/cht/egt) in the Baron B58 panel so that they work with the REP version. I have the data refs provided by Simcoders. I directly substsitued them in the subscriptions assuming that left engine is engine 1 and right is engine 2. This did not work. Am I struggling because the simcoders datarefs refer to two separate engines? I've attached the datarefs provided.

Can anyone give me some guidance on how I would go about modifying the script to account for this?
image.png

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Baron B59 REP dataref substitutions

#2 Post by Sling »

Hi,

It’s not going to be as straight forward as you perhaps hoped but it is still quite easy if you understand how AM subscriptions work.
Each subscription callback has to have the same number of returned arguments as there are subscriptions. So for instance if you replace a single dataref for 2 new ones you will need to add an argument for the extra one in the callback. Additionally the Xplane default engine parameter datarefs tend to be an array of FLOAT data types so you will need to convert the code that was reading the array into something that just reads a non array FLOAT.

Sorry to say but if this all sounds a bit alien then you have some learning to do about AM Xplane subscriptions. The best places to start are the wiki and the tutorial videos linked in my signature.

Be sure to let us know if you have queries with any of that.

Post Reply