Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Exchanging variables between C gauges and XML gauges

Featured Replies

Hi, Sorry if this has been asked before but I have searched and not found the answer. Could anyone help me by giving example code of how to share variables between C and XML gauges. This is to allow complex calcs to be performed in C code and the results used in an XML gaugeMany thanks

>Hi, >Sorry if this has been asked before but I have searched and>not found the answer. >>Could anyone help me by giving example code of how to share>variables between C and XML gauges. This is to allow complex>calcs to be performed in C code and the results used in an XML>gauge>>Many thankshttp://forums.flightsim.com/dc/dcboard.php...sg_id=233&page=

  • Moderator

Thanks for the reference to my "mini-tip" Patrick!I've just added a "Part 2" to the post explaining how to use the execute_calculator_code(); function as an alternative method. :)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Many thanks for the rapid replies guy's. I'm sure I'll crack this now.CheersDoug

Just read part 2 Bill, but not sure what you are trying to tell people when you say:

Note that the same structure may be made bi-directional, meaning that you can use XML to control the C variable, or use the C variable to control the XML variable.
as that function call will copies XML vars to the variable at the specified pointer, but not the reverse.If you are refering to Part I above, then you might want to make that clearer for the noobs. =)But who knows, maybe I have forgot something. =)Anyway, glad to point out your excellent tips that you took the time to make.
  • Moderator

>If you are refering to Part I above, then you might want to>make that clearer for the noobs. =)Thanks. That'll teach me to try writing a coherent explanation that early in the morning when I'm still barely awake! ;)BTW, if you ever feel like posting a "tip", it'd be most welcome.While this forum is much busier, at least "over there" I have some control over the posts, and can easily collate tips into a more digestable form for quicker reference. ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Will do. Yes, it is a great place for that given that you can sticky them etc.Patrick

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.