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.

Anyone know why this isn't working?

Featured Replies

  • Moderator

If the value of COM_mem[12] is 0.00, then I want to suppress display, otherwise, display the value: if (COM_mem[12] != 0.00f) { swprintf(buf,L"%3.2f",COM_mem[12]); } else { swprintf(buf,L""); }Unfortunately, it isn't working as expected... swprintf(buf,L"");by itself works as expected, so obviously the problem is in the if condition... I've tried using simply 0, 0.00, and now 0.00f and none of 'em work.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

Just for the record, the syntax for the evaluation is quite correct and works perfectly...The problem turned out to be that the contents of the array weren't actually zero...Lesson learned: don't try to use an integer variable to initialize a float variable... ;)Another lesson learned: don't try to run a loop in PRE_UPDATE or PRE_DRAW, unless you provide a flag to inhibit it from running twice... since both PRE_UPDATE and PRE_DRAW are run twice per gauge cycle...

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.