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.

Three-way switch logic

Featured Replies

Hi! Any idea how best to make a three-way switch on the a320? Thanx !

The way I have done this for my simpit is with 2 AAO commands. 

The first command is for the "up" position. This AAO command has the desired function on the button press "on" and the middle function of the switch on the button release "off".

The second command is for the "down" position. Again, The AAO command as the desired function on the button press "on" and the middle function of the switch on the button release "off".

There may be other ways that are more elegant, for example with a script, but this way works in my application.

 

Edited by hs118

My MSFS 2020 repaints: Flightsim.to - Profile of HStreet

Working on MSFS 2024 versions.

  • Commercial Member
1 hour ago, Sky Flyer said:

Hi! Any idea how best to make a three-way switch on the a320? Thanx !

What simulator?
What switch in which A320?
For what kind of external control? Momentary button on a yoke, switch on a switchbox, StreamDeck?

Edited by Lorby_SI

LORBY-SI

  • Author

Thanks for answers ! I use x-touch mini - I have no problems with it. Now I'm trying to set up Streamdeck XL - no problems with toggle and two way buttons, but I can't figure out how to cycle through 3 values. prepar3d 5.3 simulator, fslabs.

  • Commercial Member
1 hour ago, Sky Flyer said:

Thanks for answers ! I use x-touch mini - I have no problems with it. Now I'm trying to set up Streamdeck XL - no problems with toggle and two way buttons, but I can't figure out how to cycle through 3 values. prepar3d 5.3 simulator, fslabs.

This must be done with RPN scripts. The actual script code depends on what that switch is supposed to do, there is no generic solution. Cycle an LVar through 3 values? Trigger a K-Event with three different values? Something else entirely?

LORBY-SI

  • Author

I tried to write 3 values through LVAR , but the switch position changes only visually, without triggering the event. I do not quite understand how to do the same through K-rotors. The command must depend on the actual starting position of the switch.

37 minutes ago, Sky Flyer said:

...but the switch position changes only visually, without triggering the event.

Which switch??

  • Commercial Member
44 minutes ago, Sky Flyer said:

I tried to write 3 values through LVAR , but the switch position changes only visually, without triggering the event. I do not quite understand how to do the same through K-rotors. The command must depend on the actual starting position of the switch.

As @Noncon says: we need to know EXACTLY what you are trying to do. There is no generic approach. 

This is potentially different for every switch (and every aircraft - and every sim). 

LORBY-SI

  • Commercial Member
1 hour ago, Sky Flyer said:

I tried to write 3 values through LVAR , but the switch position changes only visually, without triggering the event

That is quite normal. LVars traditionally control (only) the animation.

I'm not sure what kind of logic the FSLabs A320 uses or if it has an SDK/API (I think that it doesn't). But your answer suggests that it uses the ROTOR_BRAKE event somehow. So your script would have to read the LVar, which will give you the current position of the switch. Depending on that value you send the appropriate ROTOR_BRAKE event. 

I don't own the FSLabs myself, so I can only guess. Assuming (= not actually knowing) that the LVar goes through 0, 1, 2 for the three positions, you make one script like this

(L:whatever, Number) 0 == if{ whatever_gets_the_switch_to_position_1 (>K:ROTOR_BRAKE) } 
(L:whatever, Number) 1 == if{ whatever_gets_the_switch_to_position_2 (>K:ROTOR_BRAKE) } 
(L:whatever, Number) 2 == if{ whatever_gets_the_switch_to_position_0 (>K:ROTOR_BRAKE) } 

Or something like that.

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.