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.

Fenix A320 Integrated lights mapping to Slider

Featured Replies

I am trying to map the integrated lights dials in the A320 to the physical slider on my WinWing Ursa Minor joystick, I came across a Fenix support page that includes the script to map all integrated lights in the cockpit and read their value, however the example mapped them to an X-Touch mini encoder and seemed to use a regular button mapping (https://support.fenixsim.com/hc/en-us/articles/12466468901135-Example-of-How-to-Bind-Switches-Knobs-and-Buttons-on-FenixSim-Aircraft-to-External-Hardware#:~:text=In Axis And Ohs%2C all,A_FCU_LIGHTING%2C·Number)·}😞

 

(L:A_FCU_LIGHTING,·Number)·1·<·if{·(L:A_FCU_LIGHTING,·Number)·0.1·+·(>L:A_FCU_LIGHTING,·Number)·}


(L:A_OH_LIGHTING_OVD,·Number)·1·<·if{·(L:A_OH_LIGHTING_OVD,·Number)·0.1·+·(>L:A_OH_LIGHTING_OVD,·Number)·}


(L:A_PED_LIGHTING_PEDESTAL,·Number)·1·<·if{·(L:A_PED_LIGHTING_PEDESTAL,·Number)·0.1·+·(>L:A_PED_LIGHTING_PEDESTAL,·Number)·}

And the code for decreasing them (separate script!):

(L:A_FCU_LIGHTING,·Number)·0·>·if{·(L:A_FCU_LIGHTING,·Number)·0.1·-·(>L:A_FCU_LIGHTING,·Number)·}


(L:A_OH_LIGHTING_OVD,·Number)·0·>·if{·(L:A_OH_LIGHTING_OVD,·Number)·0.1·-·(>L:A_OH_LIGHTING_OVD,·Number)·}


(L:A_PED_LIGHTING_PEDESTAL,·Number)·0·>·if{·(L:A_PED_LIGHTING_PEDESTAL,·Number)·0.1·-·(>L:A_PED_LIGHTING_PEDESTAL,·Number)·}

 

I recreated the scripts in my AAO but can't figure out how to map them to the slider axis through the add axis (or how to map the axis to a button). I am completely lost it this point. Any help would be very much appreciated.

 

Lior

  • Commercial Member
1 hour ago, CloudStrider said:

I am completely lost it this point

These scripts can only be assigned to button. All they do is increment or decrement the lights by 10%, they do not model an axis.

Sorry, I am not using the Fenix, so I can only give general advice.

First, you create a script that utilizes the scriptvariable to transform an axis value into a setting for the light potentiometers:

Scriptgroup: Fenix
ScriptTitle: LightsAxis
Code:

(L:Fenix-LightsAxis)·10·/·s0·
l0·(>L:A_FCU_LIGHTING,·Number)·
l0·(>L:A_OH_LIGHTING_OVD,·Number)·
l0·(>L:A_PED_LIGHTING_PEDESTAL,·Number)·

This script you assign to an axis where you set Axis Min = 0, Axis Max = 10, Rounding = Int. The axis will transmit a value between 0 and 10 to the script, which will divide it by 10, resulting in a value between 0 and 1, which it will then write into the lights variables.

- The first LVar in the script is the "script variable". Its name is "(L:scriptgroup-scripttitle)", so should you decide to rename the script or store it in a different group, the script variable must be renamed accordingly.
- Please note the use of RPN registers here: "s0" stores the value in register 0, "l0" retrieves it from register 0 (that is "ell - zero", not "ten")

Edited by Lorby_SI

LORBY-SI

  • Author

thank you so much for the prompt response! 

AMAZING! the script worked beautifully!!! I'm going to try and adopt it for other planes if I can as well. Great job!

 

Lior

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.