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.

Cycling through gauge displays with single button

Featured Replies

I am new to gauge programming and have a bit of a bonehead question. I am not sure what the best approach to cycling through the display of data when a gauge has only a single button. If it has a dial then it is pretty simple to put in left and right mouse areas that increase or decrease the (L: GAUGE_DISPLAY_MODE, enum), and then stop at the lowest or highest case setting.In this situation though I am having a bit of failure of imagination. With the single button, I want each button press to cycle through one of four cases/modes (0 through 3). And when it gets to the fourth case, clicking again should cycle back to the lowest case/mode.This is what I have so far:

<Click>(L:GAUGE MODE SELECT, enum) 1 + (>L:GAUGE MODE SELECT, enum) (L:GAUGE SELECT, enum) 3 > if{ 3 (>L:GAUGE MODE SELECT, enum) }</Click>

What else do I have to cram in there to get it to reset to Case 0 once it's hit Case 3?

<Click>(L:GAUGE MODE SELECT, enum) 1 + (>L:GAUGE MODE SELECT, enum) (L:GAUGE SELECT, enum) 3 > if{ 3 (>L:GAUGE MODE SELECT, enum) }</Click>

What else do I have to cram in there to get it to reset to Case 0 once it's hit Case 3?

Hi,Just that...Now you have this function in place:
(L:GAUGE SELECT, enum) 3 > if{ 3 (>L:GAUGE MODE SELECT, enum) }

if you correct the first name to L:Gauge MODE Select, enum :( , this sets the gauge mode select to 3 if its value gets over 3.Maybe you should try setting it to zero or one, depending on how your display is dependant on the value of L:gauge mode select, enum.

(L:GAUGE MODE SELECT, enum) 3 > if{ 0 (>L:GAUGE MODE SELECT, enum) }

hope this helpsgrtWillem

I guess it helps not to have syntax errors in there, too, eh? :( Thanks, this is terrific.

I guess it helps not to have syntax errors in there, too, eh? :(
Ah well,you were very much on the right track! :( And sometimes it's the obvious you don't see....grtWillem.

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.