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.

AAAO & Stream Deck Plugin: ON Variable/ON value issue

Featured Replies

Hi,

I'm trying to map ON variable and ON value fields of the TextGauge object. I wish them were able to check non only boolean A or L functions, but for example String ones. Those field work pretty good only with Boolean Vars.

Is it true or I'm missing someting, the correct syntax on ON variable/ON value fields for example (I tried any kind of syntax combination without results).

Thanks for your support.

 

Regards

Peppuzzo

  • Commercial Member
5 hours ago, Peppuzzo said:

the correct syntax on ON variable/ON value fields for example 

There is a PDF document in the ZIP of the AAO plugin with examples and a description of the actions. It also describes a method how to copy&paste variables names from AAO.

And yes, these fields only work with numerical values (in the FS world, Bool is numerical too = 0/1).

99,5% of all simulator variables are numerical. What "string variables" are you trying to use for what exactly?

 

LORBY-SI

  • Author

Thanks Lordby for your feedback,

I'm almost confident with your Stream Deck plugin. I'm configurating a lot of new buttons.

I have a problem with numeric variables too. For example I wish config a TextGauge with both Right and Left Tank Qty (no problem at this point), and trigger "On variable" field on FUEL_TANK_SELECTOR__1 simvar that deliver 2 or 3 as output. It seems that "On Value" doesn't trigger as I expect.

For the other need, I mind to use a new Local Variable capable to store the status of the BUG: "HDG", "ALT", "VS", and so on, and use if for showing it on StreamDeck and for other use. But knowing that "On variable" works only with numerical values, I'm sure I'll find workarounds.

But the first issue still exists.

  • Commercial Member
2 hours ago, Peppuzzo said:

and trigger "On variable" field on FUEL_TANK_SELECTOR__1 simvar that deliver 2 or 3 as output.

I'm sorry, but I don't understand what you are trying to tell me here.

For more complex procedures I suggest that you write an RPN script and just call that script from the stream deck instead. Or use autoscripts to translate specific values to 0/1 or to map simulator variables to LVars (so for example an LVar of your choice always contains the amount of fuel in the currently selected tank).

2 hours ago, Peppuzzo said:

For the other need, I mind to use a new Local Variable capable to store the status of the BUG: "HDG", "ALT", "VS", and so on, and use if for showing it on StreamDeck and for other use. But knowing that "On variable" works only with numerical values, I'm sure I'll find workarounds.

This I don't understand either. Again, RPN scripts will probably be the way to go, whatever you are trying to do here. You have an entire programming language at your disposal with the AAO RPN scripts. So setting some LVars to your desired values and reacting to those values on the SD should not pose any problems.

Besides, the plugin is just a sample, to show people how you can communicate with the AAO WebAPI. You are welcome to alter the code (it is just Javascript) to your needs.

Edited by Lorby_SI

LORBY-SI

  • Author
55 minutes ago, Lorby_SI said:

I'm sorry, but I don't understand what you are trying to tell me here.

No, I'm sorry. I don't handle the English language that well, and I probably can't make myself understood.

I meant that maybe the "ON variable" field of TextGauge only works with 0 and 1. Not with other numbers nor (this was clear) with strings.

About the RPN Script, I am certainly trying to learn and something I have already understand and solve. But JavaScript is a little beyond my remit.

Thank you for your advices.

  • Commercial Member
8 hours ago, Peppuzzo said:

I meant that maybe the "ON variable" field of TextGauge only works with 0 and 1. Not with other numbers nor (this was clear) with strings.

The action only has two pictures assigned, this is but a binary choice. 

Maybe consider using a slider gauge instead. With that you can use a strip of several background pictures that you shift to  the position that corresponds to your variable. (When your variable has 4 distinct values, you create a 144x576 pixel image with four different background side by side. Then let the slider gauge shift it to the correct one)

LORBY-SI

  • Author

Thanks one more Lorby, expecially for your patience.

Only for amusement I'm going to show you a scenario. I'm in love with Carenado Mooney Bravo M20R on Microsoft Flight Simulator. It has 2 fuel tanks, managed manually. What I wish is a single Stream Deck button that is able to show both tank reserves in gallons, highliting whitch tank is selected and switch from one to the other with a push action on the same button. It seems almost simple, all events and vars are available. In addiction the your TextGauge may be perfect:

  • shows 2 vars at the same time
  • can trigger an event (I'm able to develop a script in order to switch between tanks), and
  • tests a variable that and may trigger 2 different icons (usefull to indicate the active tank).

It's a pity that the active tank are get from simvar as numbers (FUEL_TANK_SELECTOR__1), the left one is the number 2, the right one is the number 3. I tried to set the "On variable" field the simvar and 2 on "On value", but it doesn't work. I can workaround that using 2 buttons (having only 15 buttons on my Stream Deck, saving them is essential) or using a local var that converts 2 and 3 in 0 and 1. But I don't like local vars to much.

 

Archived

This topic is now archived and is closed to further replies.

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.