Jump to content
Sign in to follow this  
Guest prospector21

xml question - math?

Recommended Posts

Guest prospector21

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

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
Guest prospector21

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...