August 27, 20241 yr 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>
August 27, 20241 yr 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
August 27, 20241 yr 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? 😄
August 27, 20241 yr 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?
August 27, 20241 yr 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