January 21Jan 21 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
January 21Jan 21 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 January 21Jan 21 by Lorby_SI LORBY-SI
January 23Jan 23 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