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.

Concatenate a Symbol After a Variable

Featured Replies

Hello,

I am not sure this is possible and I can't find anything that says it is, or isn't possible.

With a simple StreamDeck Text Gauge (AAO plugin) can I display a value, 'Ambient Temperature, Fahrenheit', for example.

That works and returns a value of 44.  perfect.  Now, immediately after the variable can i "concatenate" (excel terminology but I didn't know what else to call it, a symbol.

Example of Current Output:  44
Desired Output:  44°

Is it possible to add ° after the variable value?

Thanks for all of you help with this question and all my other questions.

  • Commercial Member

There are several options to do this. Here is the "pure RPN" one, which is the most flexible

For Variable 1: set type "S:" (for "Script") and put this RPN code into the box:

%(A:AMBIENT TEMPERATURE, Fahrenheit)%!d! '°' scat

With AAO RPN and on the StreamDeck in general, take extra care to always write variables the same way. AAO's RPN parser is case sensitive.

Edited by Lorby_SI

LORBY-SI

  • Author

Ok, I've been playing around with this and I have a few questions.

#1 
This works perfectly, but has no decimal point due to the !d!.
%(A:GENERAL ENG MIXTURE LEVER POSITION:1, Percent)%!d! '%' scat

I tried this:
%(A:GENERAL ENG MIXTURE LEVER POSITION:1, Percent)%!1f! '%' scat

This return the value of 'ERR' - How can I format this so it displays one decimal point?

#2
Is it possible to concatenate a variable along with another variable.  Example:

AMBIENT TEMPERATURE, Celsius + AMBIENT TEMPERATURE, Fahrenheit
I know + is not the answer...  Something like this is what I would like to accomplish:

21.1°C  /  70.0°F

#3
Is it possible to format the size of text in the above?  I would like to make the units Superscript, or similar, so the unit is a little smaller and raised up a bit, just like this:  °F - The ° is small and superscript.  Is this even possible?

Thanks again for answering all of my questions in such a detailed manner! 

  • Commercial Member

#1 wrong formatting option, that is not how !f! works. It requires a decimal point and leading zeroes
%(A:GENERAL ENG MIXTURE LEVER POSITION:1, Percent)%!01.1f! '%' scat

#2 yes, "scat" is the concatenation operator (scat = "string concatenation")
But you can also just use the Variables 2 and 3, the Text Gauge will display all of them at the same time, it is just a matter of adjusting the offsets correctly. But I wouldn't do it this way, because the actions on the SD are way too small for long text. I would display one at the top and the other at the bottom.

#3 No, that is not possible. You would have to split the display into different parts, and for example add the degree signs by painting them on the background image of the Action and then make it draw the text next to that. 
This would also be possible with a MultiGauge using three text definitions (one with the degree signs and two more with the variables)

Edited by Lorby_SI

LORBY-SI

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.