Hi
At first.... Here our User "JaimeLeon" and "Tuomas" on our Discord
https://discord.gg/99vHbK7 are very advanced.
They know all this RPN stuff and can help better like me.
You can also google for a lot of guides how to programm in RPN....: those explane the syntax.
About Question.....
I also not fully know this stuff but most is logical.
The upper part is the Read .... (L:LIGHTING_NAV_0) So we read this Variable ....
In the MIddle there are "writes" (>K:2:NAV_LIGHTS_SET) The ">" is the syntax to WRITE something
means basically... We Read a Lvar .... We made a logical If Statement , and finally we execute commands in case of the Condition.
The If itself indicated by the BOOL Status .
Its a little confusing in case we not say something like if $=1 like here in Mobiflight Transform....
The if in RPN without anymore parameter simply means.... If Boolean TRUE, THEN do, ELSE do ( Else means Boolean FALSE)
In that example.... If Lvar " LIGHTING_NAV_0" is TRUE (ON)
THEN :
0 0 (>K:2:NAV_LIGHTS_SET)
0 0 (>K:2:LOGO_LIGHTS_SET)
That means send on Index position 0 ( of this multi index K Event) a value of 0
This code do 2 things in a row... it set the Nav and the logo Lights both to 0
ELSE :
0 1 (>K:2:NAV_LIGHTS_SET)
0 1 (>K:2:LOGO_LIGHTS_SET)
Here it again set the Index 0 part of these KEvents but now with Value 1:
********
In very simple words....
We say Read Lvar (i expect the current state of that Nav Lights)
And we say IF these are currently 1 THEN set Nav and Logolights same time to 0.... ELSE (If var is currently 0) set both to 1.
Summary: The logic is easy.... Just the "Index" is the confusing part here....