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.

Help with assigning axis to an Lvar for a three way switch

Featured Replies

Thanks for a tremendously useful [read essential] program for MSFS. 

I am having trouble understanding the directions in the manual for assigning an axis to a three position switch.  The documentation for the plane lists the following commands:

Starter selector: (Left-Center-right)
CARVAR_SW_STARTER_LR (LVAR) - (0-1-2)

In an effort to set the left position, I have made the following entries:

              Enter Variable: L:CARVAR_SW_Starter_LR, 0   [I manually added the comma, space and 0 as suggested in the documentation]

               Axis min: 0      Axis max: 1

              Update value: “on change”  “float” are checked

              Device: Thrustmaster throttle

              Move Joystick axis:  Slider 0

              Input Ranges:   Left margin: 47%           Center: 73%

                                           Right margin: 0%           Deadzone: 9%

The switch does not move in the sim when I move the slider axis.  One or more of my entries is obviously wrong.  I just don’t know how to fix it.

Any help or suggestions on how to set the left, center and right positions for the switch using this axis would be very welcome.

 

Thanks

Edited by TASCHMANN

  • Commercial Member
6 hours ago, TASCHMANN said:

Enter Variable: L:CARVAR_SW_Starter_LR, 0   [I manually added the comma, space and 0 as suggested in the documentation]

Why would you add "0"? Where does it say that in the AAO documentation (I would really like to know, because this is wrong)?

What you actually have to add is the "Unit" of the LVar, usually ", Number"

 Enter Variable: L:CARVAR_SW_Starter_LR, Number
And from what you posted above, the value range is probably more like Axis Min = 0 and Axis Max = 2 (it says "0-1-2", right?)

Maybe try these variables in an RPN script first, to make sure that they do what you expect:
2 (>L:CARVAR_SW_Starter_LR, Number)
1 (>L:CARVAR_SW_Starter_LR, Number)
0 (>L:CARVAR_SW_Starter_LR, Number)

Be mindful that you cannot just copy&paste code from the RPN Editor box - it contains "fill-characters" (the dots). If you want to c&p, use the compiled code from the grey box below the editor.

Edited by Lorby_SI

LORBY-SI

  • Author

Thanks for the reply.  In answer to your question, I guess I misunderstood section 3.6.5 of the documentation.  Although I enjoy AAO tremendously as it adds a great deal of depth and enjoyment to MSFS, I have very little understanding of programming concepts and, at age 75, I suspect my mind is not as sharp as it once was .  I do understand how I made a fundamental error in the "Axis min" and "Axis max".

I will continue to work on the axis assignment in light of the things you have pointed out and report back.

Once again thanks for writing a great program and for your help thus far.

 

  • Author

Just to let you know.  I made both of the changes that you suggested and, of course, the axis works perfectly now on the 3 way switch. 

Great example for other developers to follow of first rate support for a first rate product!

Thanks

  • Commercial Member
4 hours ago, TASCHMANN said:

I guess I misunderstood section 3.6.5 of the documentation. 

The part about the index numbers? Should I rephrase that?

Indexes only exist for A: type simulator variables. And when you select one of those with the "+" key, then you will get for example this:
(A:COM ACTIVE FREQUENCY:index, Frequency BCD16)

To actually use this, the "index" part must be replaced with the simulator-internal "index" of the item that you wish to query the data from or write to. In this case 1, 2 or 3, for COM1, COM2, COM3.
So (A:COM ACTIVE FREQUENCY:1, Frequency BCD16) returns the active frequency of COM 1.

That is all that I tried to say in that paragraph....

AAO is basically just a translator between the real world and the simulator SDK. But not everybody speaks SDK, so I try to rephrase it as best as I can - but more often than not that can fail...

Simulation Variables (flightsimulator.com)

Event IDs (flightsimulator.com)

etc...

Edited by Lorby_SI

LORBY-SI

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.