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.

(A:AUTOPILOT MASTER,bool)

Featured Replies

  • Moderator

This is bizzare. This works (backwards of course): (A:AUTOPILOT MASTER,bool) 0 ==A/P But this will NOT work! (A:AUTOPILOT MASTER,bool) 1 ==A/P Neither does this! (A:AUTOPILOT MASTER,bool) 0 !=A/P Does anyone have any idea why???

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Commercial Member

The SDK states:"The only reliable numeric equivalent is that 0 is returned for False. Non-zero values, especially both 1 and -1, are used to indicate True. "I'd believe the very first sentence religously.You might try looking at it as a number value instead of a bool value... oh, and according to the SDK, it's Bool.. not bool.

Ed Wilson

Mindstar Aviation
My Playland - I69

Hi,May be it doesn't work in formattedtext, try normal textOtherwise something like:Color="%('color1' 'color1' (A:AUTOPILOT MASTER,bool) ?)" etc.%((A:AUTOPILOT MASTER,bool))%{if}A/P%{else}A/PBtw. i use (A:AUTOPILOT MASTER,bool)or(A:AUTOPILOT MASTER,bool) !Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author
  • Moderator

Thanks, Jan.This works a treat:%((A:AUTOPILOT MASTER,bool))%{if}A/P%{else} However I could have sworn I'd already tried that variation at least once!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Bill, the behavior you describe is really weird.(A:Autopilot Master,bool) MUST return 0 or 1 - no other option possible. Maybe the problem was elsewhere? The only Avar with bool unit that returns -1 is (A:HSI CDI NEEDLE VALID,bool) so far I've tested, which I assume as a code bug.Anyway, the very advantage of using bool unit is precisely that you don't need to make any comparison at all, just the Avar itself will put a 0 or 1 in the stack, as you've already noticed :-)And regarding Ed's comment on unit spelling, remember that variables, units and events are NOT case sensitive; they are translated to uppercase by the parser (then BOOL, Bool and bool are all ok)Tom

  • Author
  • Moderator

>Bill, the behavior you describe is really weird.>(A:Autopilot Master,bool) MUST return 0 or 1 - no other option>possible. Maybe the problem was elsewhere? >The only Avar with bool unit that returns -1 is (A:HSI CDI>NEEDLE VALID,bool) so far I've tested, which I assume as a>code bug.Tom, I monitored the A:vars in question and they indeed did report correct values......so, obviously the problem must be that (A:var,unit) simply won't work with formatted text...I've used Jan's suggestion and simply put the conditions in the script and it seems to be working fine now... :-beerchug I truly hate having to do it this way since it's a major PITA, but that's they way the cookie crumbles... :(

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.