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.

Using XML variables in C... (moved from original thread)

Featured Replies

  • Moderator

>>Oops... more catching up to do, Dai... ;) FS9 does offer>ADF2>>now...>>...kinda, sorta...>>I'm likely to be sticking with C unless pushed. Actually, now>I come to think of it, my dayjob with The Other Big IDE>Company will probably let me learn XML anyway.Dai, I was referring to reading XML variables in a C gauge. For example, the following placed in _PRE_UPDATE:execute_calculator_code("(A:ADF ACTIVE FREQUENCY:1, KHz)",&adf1_freq,NULL,NULL);execute_calculator_code("(A:ADF ACTIVE FREQUENCY:2, KHz)",&adf2_freq,NULL,NULL);We now have adf1_freq and adf2_freq as FLOAT64 variables, with no muss, no fuss since we asked for 'em to be returned in KHz already.The function in gauges.h uses this prototype:BOOL (FSAPI *execute_calculator_code) (PCSTRINGZ code, FLOAT64* fvalue, SINT32* ivalue, PCSTRINGZ* svalue);This allows us to retrieve float, integer or string values from XML variables directly. This is important since there are some variables that are only availble as XML vars, there being no C equivalent! ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.