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.

Use of a Macro/Var in the AAO Gauge code

Featured Replies

Here is a code snippet from a AAO Gauge I am working on. The gauge simulates the KORG nanoKONTROL2 MIDI controller I use with AAO. A slider on the KORG controls the propeller and the code snippet controls the slider on the Gauge. Happy days (almost).

I would like to avoid hard coding the Gauge with "(IE:ENGINE_Propeller_1)" and instead I want it to come from a Variable or Macro which can be defined elsewhere. I tried several ways to achieve this without much success! The use case is code the gauge once and then use configuration files to tailor it to match different air crafts.

The idea came from Funatic's mod:

https://flightsim.to/file/38162/x-touch-mini-gauge-for-use-with-aao-axis-and-ohs?__cf_chl_tk=WexMWXnRnlrMm9VSFePNMALVHRNRQTrphl1aBJcq9oA-1724748478-0.0.1.1-5396

I hacked the original code to work with my KORG as the mod is for the X-Touch mini. The Macros Funatic use in his code is beyond my comprehension!.

 <Element>
    <Position X="330" Y="123" />
    <Image Name="M\XT_Sld.png" ImageSizes="27,60,27,60">
      <Axis X="0" Y="30" PointsTo="North" />
    </Image>
    <Shift>
      <Value Minimum="0" Maximum="100">(IE:ENGINE_Propeller_1)</Value>
      <Nonlinearity>
        <Item Value="0" X="0" Y="100" />
        <Item Value="100" X="0" Y="0" />
      </Nonlinearity>
    </Shift>
  </Element>

 

  • Commercial Member
59 minutes ago, london-simmer said:

The Macros Funatic use in his code is beyond my comprehension!.

Did you consider asking him for help? Only he knows how and why he did what he did. I believe that he is active on various forums and Discord?

LORBY-SI

  • Author
19 minutes ago, Lorby_SI said:

Did you consider asking him for help? Only he knows how and why he did what he did. I believe that he is active on various forums and Discord?

😄

  • Author
26 minutes ago, Lorby_SI said:

Did you consider asking him for help? Only he knows how and why he did what he did. I believe that he is active on various forums and Discord?

ok, is it possible to achieve what I want?

  • Commercial Member
2 hours ago, london-simmer said:

ok, is it possible to achieve what I want?

I have no idea, sorry.

Gut feeling says, that you use your own LVars in the gauge code and then add an autoscript that writes the actual variable values into those LVars. Then you don't have to touch the gauge code ever again. But there are probably a dozen other ways how to do this.

Only Funatic can tell you how he did it. I know that he is using some advanced features too, like base64 encoded images that are saved in LVars too and displayed accordingly at runtime. But I really don't know how he did all that. I only provide the hammer, I don't build the house.

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.