May 22, 20215 yr Hi there, still enjoying the AAO Software with the StreamDeck and the FBW Airbus. I am searching more, reading and learning more about LVars, RPN Scripts and Filemanagement of MSFS then actual flying, but now I need help (again). I want to controll the Airbus Landing Light 1 and 2 separatly, but all I can find is the LANDING_LIGHTS_TOGGLE which controls both of them. What I found is "LANDING_1_Retracted" and "LANDING_2_Retracted" and I can controll both Lights if they are Off or Retracted for their own. But I really don't know how to turn them on! What I found is the following, but it has no KEY_ID or other hint how to control it (SWITCH_OVHD_EXTLT_LANDL doesn't work for me). <UseTemplate Name="ASOBO_LIGHTING_Switch_Light_Landing_Template"> <NODE_ID>SWITCH_OVHD_EXTLT_LANDL</NODE_ID> <ANIM_NAME>SWITCH_OVHD_EXTLT_LANDL</ANIM_NAME> <SIMVAR_INDEX>2</SIMVAR_INDEX> <ID>1</ID> <ANIMTIP_0>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_L_OFF</ANIMTIP_0> <ANIMTIP_1>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_L_ON</ANIMTIP_1> <ANIMTIP_2>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_L_RETRACT</ANIMTIP_2> <RETRACTABLE/> </UseTemplate> <UseTemplate Name="ASOBO_LIGHTING_Switch_Light_Landing_Template"> <NODE_ID>SWITCH_OVHD_EXTLT_LANDR</NODE_ID> <ANIM_NAME>SWITCH_OVHD_EXTLT_LANDR</ANIM_NAME> <SIMVAR_INDEX>3</SIMVAR_INDEX> <ID>2</ID> <RETRACTABLE/> <ANIMTIP_0>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_R_OFF</ANIMTIP_0> <ANIMTIP_1>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_R_ON</ANIMTIP_1> <ANIMTIP_2>TT:COCKPIT.TOOLTIPS.LANDING_LIGHT_R_RETRACT</ANIMTIP_2> </UseTemplate> When I search for "landing" or similar strings in the ModelBehaviourDebug window in the flightsim all I find is LANDING_1/2_Retracted 0 or 1. Can someone help me? sschw
May 22, 20215 yr Author Hi all of you, I found the soulution by myself: The variable LANDING_LIGHTS_TOGGLE is doing it: 0·(>K:LANDING_LIGHTS_TOGGLE) Toggles both landing lights and the Nose light 1·(>K:LANDING_LIGHTS_TOGGLE) Toggles just the Nose light (to T.O.) 2·(>K:LANDING_LIGHTS_TOGGLE) Toggles just the left landing light 3·(>K:LANDING_LIGHTS_TOGGLE) Toggles just the right landing light sschw
May 22, 20215 yr Author Ok, now I got my next problem (especeally with RNP I guess): What I want: I have three buttons on my StreamDeck. Landing light 1, 2 and the taxi light. If both landing lights are on, I want to switch the taxi light automatically to T.O. If one of the landing light goes off or retracted, the taxi light should go to the previous position (either off, if the taxi light switch is off or "taxt" if the taxi switch is on). What I have: Turn on and off the single landing lights is no problem, I use the AAO Script, e.g. 2·(>K:LANDING_LIGHTS_TOGGLE)·(L:LANDING_1_Retracted,·Bool)·0·==·if{0}els{1}·(>L:LANDING_1_Retracted,·Bool) for the left landing light. Setting LANDING_1_Retracted allows me to check, if the single left landing light is on or off. Now i want to add the logic (and here I fail): If (LANDING_1_Retracted switches to on and LANDING_2_Retracted is already on) switch 1 LANDING_LIGHTS_TOGGLE (which means switching the taxi light to T.O.). Is this an approach that could work? How do I check multiple conditions in an if-clause? sschw
May 22, 20215 yr Author Ok I am sorry, maybe I write too early. I implemented a version of two switches of the taxi switch now. One controlls the taxi position and one the T.O position. Maybe you can have three positions as a Toggle in AAO in the future (and show it correct on the StreamDeck I mean) Thanks anyway!
May 22, 20215 yr Commercial Member 3 hours ago, sschw said: Is this an approach that could work? How do I check multiple conditions in an if-clause? Use more than one script that call each other. I tried to replicate your requirement. 1. I created an aircraft automated script that triggers every 200ms: 0 - A320-LandLightsCheckChanged (A:LIGHT·LANDING:2,·Bool)·(A:LIGHT·LANDING:3,·Bool)·+·s1·(L:LandingLightsState)·!=·if{·l1·(>L:LandingLightsState)·1·(>K:0·-·A320-LandLightUpdate)·} 2. If there is a change with the two landing lights, the update script is called: 0·-·A320-LandLightUpdate (L:LandingLightsState)·2·==·if{·1·(>K:0·-·A320-TaxiLightOn)·}·els{·1·(>K:0·-·A320-TaxiLightOff)·} 3. This in turn calls the On and Off scripts respectively. The ON retains the current state of the taxi light variable to reinstate it when OFF is called: 0·-·A320-TaxiLightOn (A:LIGHT·LANDING:1,·Bool)·not·if{·(A:LIGHT·TAXI·ON,·Bool)·(>L:TaxiLightState)·0·(>K:TAXI_LIGHTS_SET)·1·(>K:LANDING_LIGHTS_ON)·} 0·-·A320-TaxiLightOff 1·(>K:LANDING_LIGHTS_OFF)·(L:TaxiLightState)·1·==·if{·1·(>K:TAXI_LIGHTS_SET)·} Edited May 22, 20215 yr by Lorby_SI LORBY-SI
May 23, 20215 yr Author ok thank you very much. I will try that out. I see, you are using AAO local variables. I tryed that too to determine if the RWY TURN OFF Lights are on or of (the LIGHT TAXI is not sufficiant). So I wrote the following peace of script: (L:RWY·TURN·OFF)·0·==·if{1}els{0}·(>L:RWY·TURN·OFF)·2·(>K:TOGGLE_TAXI_LIGHTS) This one works for me (if I ensure that RWY TURN OFF is 0 when the runway turnoff light is off). Now I noticed, that after a little while my button turns off again, obviously because RWY TURN OFF gets 0, I guess. So my question would be, how long are local vars stored in AAO? Why are they stored just for a limited time? Besides, why does this syntax even work?? I thought (L:RWY·TURN·OFF)·0·==·if{1}els{0} means if (RWY TURN OFF == 0) then 1 else 0 but when I click "TEST" in AAO it seems (and works) like if (RWY TURN OFF == 0) then 0 else 1 ...
May 23, 20215 yr Commercial Member 8 hours ago, sschw said: (L:RWY·TURN·OFF)·0·==·if{1}els{0} This will not work at all (or not as expected), because there is a syntax error. There MUST be a "space" between the } and the els{. (L:RWY·TURN·OFF)·0·==·if{·1·}·els{·0·} Also, I would recommend to not use spaces in variable names. 8 hours ago, sschw said: So my question would be, how long are local vars stored in AAO? Why are they stored just for a limited time? There is no limit. Make sure that there isn't another script manipulating the variable - by accident or through a logic or syntax error. Also, when you are experiencing SimConnect crashes in the background, the script handler thread has to reconnect and it will reset all variables, local or otherwise. Make sure that your scripts are correct, and that you are not calling simulator variables that don't exist etc. I will check version 2.08, see if it is possible to retain the "AAO local" variables somehow if a reconnect happens. Edited May 23, 20215 yr by Lorby_SI LORBY-SI
May 24, 20215 yr Commercial Member Btw. when you leave the RPN Editor, all scripts and variables are reset too. LORBY-SI
May 24, 20215 yr Author Oliver, do you know of an attempt to controll the pushback tug via a streamdeck / aao script? I am not sure how to do so because if I send a appropriate value 1372003475 to KEY_TUG_HEADING multiple times (e.g. 10.000 times) nothing happens and I can't find anything at the internet.
May 25, 20215 yr Commercial Member 23 hours ago, sschw said: Oliver, do you know of an attempt to controll the pushback tug via a streamdeck / aao script? I am not sure how to do so because if I send a appropriate value 1372003475 to KEY_TUG_HEADING multiple times (e.g. 10.000 times) nothing happens and I can't find anything at the internet. No, sorry, I haven't used those. What are you trying to do exactly? Steer the tug with Streamdeck buttons? I'm not sure that the whole processing pipeline is fast enough for something like this. The one pushback controller that is on the fsdeveloper site updates the heading at 18Hz. So not 10.000 times, but significantly faster than what AAO was designed to do. Are you certain that this event ID works at all in MSFS? There are a lot of variables and events listed in the SDK that don't do anything (or not yet anyway). So you never know if you are doing something wrong or if it simply doesn't work/hasn't been implemented yet. Edited May 25, 20215 yr by Lorby_SI LORBY-SI
May 25, 20215 yr Answering the tug question, here are my scripts: Tug straight: (A:PLANE·HEADING·DEGREES·TRUE,·Degrees)·11930464.711·*·(>K:KEY_TUG_HEADING) Tug left: (A:PLANE·HEADING·DEGREES·TRUE,·Degrees)·-90·+·dnor·11930464.711·*·(>K:KEY_TUG_HEADING) Tug right: (A:PLANE·HEADING·DEGREES·TRUE,·Degrees)·90·+·dnor·11930464.711·*·(>K:KEY_TUG_HEADING)
May 26, 20215 yr Author Yes indeed, that's what I was looking for. Nothing special, just pushing back, left, right, etc. Last question (I hope, but it is really exciting :D): Do you know, what the problem is with the Development version of the FBW Airbus, compared with the Experimental version? For example the Batteries, the ADIRS and other Buttons don't work, but the LVars are all there, it just don't work. I can't find the true difference in the html or js, etc files why it works or not.
Archived
This topic is now archived and is closed to further replies.