Jump to content
Sign in to follow this  
Peppuzzo

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

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

Another idea: why don't you let the icons trade places (foreground <-> background) and use 0 as the ON value? Might be worth a try.

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...