Baron B59 REP dataref substitutions

Support for Air Player desktop.

Moderators: Ralph, russ

Post Reply
Posts: 4
Joined: Fri Dec 22, 2017 10:33 am

Baron B59 REP dataref substitutions

#1 Post by Maverickman » Fri Jan 22, 2021 3:44 pm

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?

User avatar
Posts: 4435
Joined: Mon Sep 11, 2017 2:37 pm

Re: Baron B59 REP dataref substitutions

#2 Post by Sling » Fri Jan 22, 2021 4:17 pm


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

Who is online

Users browsing this forum: No registered users and 7 guests