Sign in to follow this  
MaDDogz

XML gauge - Test mode

Recommended Posts

I've made a cabin temp gauge useing xml. Im trying to make the gauge peak when i switch on the test mode for checking lamps ect.
i have this :


-<Image Name="tempneedleWindow.bmp" PointsTo="North">
<Axis Y="69" X="2"/>
</Image>
-<Rotate>
<Value Maximum="60" Minimum="-40">(L:CabinTemp,Celsius) </Value>
-<Failures>
<SYSTEM_ELECTRICAL_PANELS Action="-40"/>
</Failures>
-<Nonlinearity>
<Item Y="79" X="31" Value="-40"/>
<Item Y="60" X="56" Value="0"/>
<Item Y="60" X="75" Value="14"/>
<Item Y="79" X="138" Value="60"/>
</Nonlinearity>
<Delay DegreesPerSecond="10"/>
</Rotate>
</Element>

The Lvar for the test switch is

<Value> (L:TestMasterSwitch) </Value>
Whitch returns values of 0,1 and 2. Im useing the value 0 to illuminate the lamps on my gauge, witch i've done.


Looking at other examples, i think i need to add the (L:TestMasterSwitch) Lvar somewhere in the above <Value>...''string''(?)


Something like ; if {(L:TestMasterSwitch) 0 then (L:CabinTemp,Celsius) 60 else (L:CabinTemp,Celsius)......
(if test switch is turned on,then set temp gauge to 60 (peak), otherwise return (L:CabinTemp,Celsius) value.

Just not sure how to write the above in XML language.

Can anyone please help?

Thanks

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Just guessing, how about:

<Value ... >(L:TestMasterSwitch) 0 == if{ (L:CabinTemp,Celcius) } els{ 60 }</Value>

 

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi Barry

Glad to report that did the trick! :biggrin:

I had to change to 0 to a 1 though as it was reversed.

the complete string:

<Value Minimum="-40" Maximum="60">(L:CabinTemp,Celsius) + (L:TestMasterSwitch) 1 == if{ (L:CabinTemp,Celcius) } els{ 60 }</Value>

Thank you, appreciate the help!

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this