Sign in to follow this  
Guest prospector21

xml question - math?

Recommended Posts

Have a returned vaule 0 to about 1300 (SDK says 0 to 256) Trying to light up some colored bars based on the value returned. Have tried the following code:element visable (A:Circuit.....etc) Position x="96" y="78" Select Minimun="0" Maximum="4" Value (A:ADF1 SIGNAL, enum) Case ="0" %-- all bars grayed out Image=sig0.bmp Image Sizes=",,3,7" Bright="Yes" Case ="1" %-- first bar on(red) Image=sig1.bmp Image Sizes=",,3,7" Bright="Yes" Case ="2" %-- 1st and 2nd bar on (red and yellow) Image=sig2.bmp Image Sizes=",,3,7" Bright="Yes" Case ="3" %-- 1st, 2nd and 3d bar on(red and 2 yellows) Image=sig3.bmp Image Sizes=",,3,7" Bright="Yes" Case ="4" %-- all bars on(red, yellow, yellow, green) Image=sig4.bmp Image Sizes=",,3,7" Bright="Yes"Also tried: Value ((A:ADF1 SIGNAL, enum)180/) 180 being about 1/5th the signal valueonly could get 1st bar on or all off, Thanks for your help

Share this post


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

Hi,You can use:%((A:ADF1 SIGNAL,number))%!d!to see the value of the signal strenght (256 --> more then 50000)Then you can use: (A:ADF1 SIGNAL,number) 0 > (A:ADF1 SIGNAL,number) 500 < &&etc. etc.to show a different color of an element.Hope it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Thanks so much for your help, I was able to get it working correctly..

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