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.

Newbie logic problem

Featured Replies

I am trying to write a guage that displays a different bitmap depending on certain combinations of spoiler and flap handle positions. I think I am using the If statement incorrectly but cannot find a good example of a nested if statement. Perhaps there is a better way.Any insight would help.- Chris (A:SPOILERS LEFT POSITION, percent) 1 >=; (A:FLAPS HANDLE INDEX, enum) 4 > && if{ 3 (>L:SpeedBrakeCond, number) } (A:SPOILERS LEFT POSITION, percent) 1 >=; (A:FLAPS HANDLE INDEX, enum) 4 <=; && if{ 2 (>L:SpeedBrakeCond, number) } (A:SPOILERS LEFT POSITION, percent) 1 >=; (A:FLAPS HANDLE INDEX, enum) 2 <=; && if{ 1 (>L:SpeedBrakeCond, number) } (A:SPOILERS LEFT POSITION, percent) 1 < (A:FLAPS HANDLE INDEX, enum) 0 == && if{ 0 (>L:SpeedBrakeCond, number) } (L:SpeedBrakeCond, number)

  • Author

Hi,It seems to be a logical issue here, because(A:FLAPS HANDLE INDEX, enum) 4 <=; and(A:FLAPS HANDLE INDEX, enum) 2 <=; Both return the same bool value when result is 2 or less , but you are assigning different (SpeedBrake) valuesI guess you actually want to do (A:FLAPS HANDLE INDEX, enum) 2 > 4 <= so you might replace the sentence with (A:FLAPS HANDLE INDEX, enum) 4 <=; for something like (not tested):(A:SPOILERS LEFT POSITION, percent) 1 >=; (A:FLAPS HANDLE INDEX, enum) d 2 > 0 max 4 <= * && if{ 2 (>L:SpeedBrakeCond, number) } Some better and faster approaches can be achieved if you know how to deal with registers (s0,s1, etc-l0,l1 etc)Regards,Tom Edit: Lately I recalled of semicolon after ">=", you should erase it from the code to work ok.

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.