Hey CBA,
I think you almost have to make two different gauges, and you need to have more triggers. You need some basic logic.
Already you have some great parts of this modular gauge. What you need is to sort of 'map out' how it would work in all of its 'conditions'.
For instance, it needs to;
* Turn on when under 10,000 feet
* Be in flight
* Be above 50 knots
* If lights are already off
So we go into the SDK and find the conditions which will be in 'airframe' or 'A' conditions. We already have speed and altitude. So we need 'in flight'. RADIO HEIGHT is one way. We'll write something like 5 feet or higer, (5 > )
Together, it would be like this;
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="autolandlights">
<Element>
<Shift>
<Value>(A:INDICATED ALTITUDE,feet) 10000 <
(A:AIRSPEED INDICATED, knots) 50 >
(A:RADIO HEIGHT, feet) 5 >
(A:LIGHT LANDING, bool) 0 ==
and and and
if{ (>K:LANDING_LIGHTS_ON) }
els{ (>K:LANDING_LIGHTS_OFF) }
</Value>
</Shift>
</Element>
</Gauge>
This hasnt been tested and it might mess things up, but give it a try and see how it works. Might need a little tweaking.
You can see that I added 'lights off' to the conditions. Also note the 3 'and's in there. If you have say 6 conditions, then you would have 5 ands. If you have 3 condtions, you would have 2 ands. (one short of the total amount of conditions).
Once you learn the basics, this can be pretty cool. But... It has lots of little snags in comprehending how it all works. having a few gauges to study really helps you to get the basics of how things work. It took me a couple of years to fully comprehend all of this. There is soooooooooooo much to gauge programming, especially when you know ZERO programming.
Bill