Jump to content
Sign in to follow this  
bluebell2

Using both Reality XP GNS530/430 and GTN750650

Recommended Posts

I am working on a setup where I change the cockpit config with different liveries from GNS530/430 to GTN750/650.

All works well apart from RXP/GPS/MASTER_DEVICE_NEXT. I have setup a indicator to tell me which device is master and no matter

what I set-up in the ini files true or false it always starts with GNS430-2 as master. When I select next device it goes to GTN-1, then GTN-2 and DEFAULT.

It will not cycle the GNS-1 and GNS-2 but only looks at the GTN plugin.

As the RXP/GPS/MASTER_DEVICE_NEXT is the same command for both plugins can we have some why to switch from one to the

other or for this command to look at both ini files when both installed.

 

On another point when I only have the GTN plugin it always starts with GTN650-2 as master no matter what I setup in ini file.

 

Tom.


Just seen in manual that this command is designed to work across multiple Reality XP plugins. As far as I can see it not working that way.

Share this post


Link to post
Share on other sites

We've solved a bug in the GNS code dealing with the settings file (about which gauge type+unit gets saves) which is related to this. We're porting this bug fix to the GTN code for the next update.

 

As for gps master, it works across multiple plugin with direct write to the dataref. That is if you set the dataref to 0 (no masters), or to a meaningful device id (an id recognize by the plugin(s), the correct plugin will pick it up. However, 'device next' implies all plugins would have to share a list and this is not designed like this.

 

Usually, the current system is ok for most cases. In your case, I'd recommend you write device id(s) to the dataref, instead of using the publish commands.


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Let your voice be heard and help us make a difference for you: Vote !
Open up communications with Reality-XP (Microsoft Flight Simulator Forums)

Share this post


Link to post
Share on other sites

So if I set RXP/radios/indicators/gps_master_device to:-

 

825571143 for GTN750-1

842348103 for GTN650-2

825439559 for GNS530-1

842216519 for GNS430-2

 

In SASL:-

defineProperty("gps_master", globalPropertyi("RXP/radios/indicators/gps_master_device"))
defineProperty("gtn", globalPropertyi("429/ann/rxp_gtn"))
defineProperty("gns", globalPropertyi("429/ann/rxp_gns"))
 
function update()
 
   if (get(gtn) == 0) then set(gps_master, 825571143)
   end
   if (get(gtn) == 1) then set(gps_master, 842348103)
   end
   if (get(gns) == 0) then set(gps_master, 825439559)
   end
   if (get(gns) == 1) then set(gps_master, 842216519)
   end
   
end
 
 
Tom.

OR

 

defineProperty("gps_master", globalPropertyi("RXP/radios/indicators/gps_master_device"))
defineProperty("gps_state", globalPropertyi("429/ann/rxp_gps"))
 
function update()
 
   if (get(gps_state) == 0) then set(gps_master, 0)
   end
   if (get(gps_state) == 1) then set(gps_master, 825571143)
   end
   if (get(gps_state) == 2) then set(gps_master, 842348103)
   end
   if (get(gps_state) == 3) then set(gps_master, 825439559)
   end
   if (get(gps_state) == 4) then set(gps_master, 842216519)
   end
   
end

Share this post


Link to post
Share on other sites

I'm not fluent with SASL, but the general concept is:

 

1) Display/Indicator: READ "RXP/radios/indicators/gps_master_device" and set the light corresponding to the ID.

2) Button push: WRITE the ID corresponding to the button to "RXP/radios/indicators/gps_master_device".

 

PS: LUA supports hexadecimal literals if you prefix them with 0x

 

I find it easier to read hexadecimal than decimal for the ID(s) especially because they are just composed of 4 ASCII letters: 'G' is 0x47, '0' to '9' is 0x30 to 0x39.

 

For example, GTN 650 #2 is 'G652', in hexadecimal it is [0x47, 0x36, 0x35, 0x32] or as a 32 bits value (little endian on X86): 0x32353647 (converted to decimal it gives: 842348103)

 

Known IDs are: G431, G432, G501, G502, G531, G532, G651, G652, G751, G752

 

The same goes for the 'discrete' dataref, it is easier to use hexadecimal. The dataref value is a bitset, i.e. each bit represents a value which is either 1 (on) or 0 (off), and hexa values read bitwise naturally: 0x01 is the bit1, 0x02 is bit2, 0x04 is bit3, 0x08 is bit4, 0x10 is bit5 etc... (little endian aka lsb to the right, counting bits from 1 to 32).


Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Let your voice be heard and help us make a difference for you: Vote !
Open up communications with Reality-XP (Microsoft Flight Simulator Forums)

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...