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.

Help with MAKE_STRING

Featured Replies

Having never tried this before, I'm not sure what I'm doing wrong with this macro.#define GAUGE_CHARSET DEFAULT_CHARSET#define GAUGE_FONT_DEFAULT "Courier New"#define GAUGE_WEIGHT_DEFAULT FW_NORMAL CHAR atcID[] = "N001ST";FLOAT64 FSAPI string_cb( PELEMENT_STRING pelement ){ sprintf( pelement->string, "%s", atcID ); return 0;}MAKE_STRING( bac_id_string, NULL, NULL, IMAGE_USE_ERASE | IMAGE_USE_BRIGHT, 0, 2, 1, 87, 24, 6, MODULE_VAR_NONE, MODULE_VAR_NONE, MODULE_VAR_NONE, RGB(112,144,144), RGB(0,0,0), RGB(92,92,92), GAUGE_FONT_DEFAULT, GAUGE_WEIGHT_DEFAULT, GAUGE_CHARSET, 18, DT_CENTER | DT_VCENTER | DT_SINGLELINE, NULL, string_cb)from my code. What am I doing wrong?Patrick

Ok, I figured out I had to change the 18 to 0 to allow FS to auto compute the size.I guess if you manually set that, then you have to set the width parameter to be the width of a character vs. width of the background, but I'm still not sure.Patrick

  • Moderator

>Ok, I figured out I had to change the 18 to 0 to allow FS to>auto compute the size.>>I guess if you manually set that, then you have to set the>width parameter to be the width of a character vs. width of>the background, but I'm still not sure."Specifies the font size for the string. A value of zero (0) means scale so that NUMCHARS capital W's fit into SIZE_X. A non-zero FONT_SIZE means fixed height."I've always used a zero entry here so that the font will rescale automatically regardless of gauge drawing size, etc.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thanks Bill.I have a niffty little gauge now that displays my customer's licensed registered aircraft id, and when you mouse over it shows their software key. =)It's kind of cool because each aircraft I sell now will have a unique official aircraft registration number.Eventually, I'll be able to set this up to issue these automatically over the web too.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.