Sign in to follow this  
Guest ogeva

XML Newbie problem

Recommended Posts

I have aproblem I can't find an answer to in all tutorials and forum posts I tried. Seems to me this is simply so obvious to everybody and I am missing something...I am trying to create some xml gauges for custom panels I am bulding and can't find the suitabale gauges elsewere.My questions is this.See attached part of the default DC3 Suction xml gauge code: - - - (A:Suction Pressure,inHg) This gauge shows engine suction pressure in units of 0-10 inHg.Now my question is this. How does the 'neede' object knows how much to move and in which direction when suction changes?Why would it only move between the '0' and '10' on the gauge base bitmap?If I created a custom gauge, with needles pointing, say, west. And the parameter the gauge shows (Airspeed, Altitude, whatever) changes, how would the gauge know how much to move? What is the full circle for it?Thanks, in advance,http://online.vatsimindicators.net/825051/142.png

Share this post


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

You left out some critical parts of the code in your example. Here is a complete code segment for a "rotating needle" in a suction gauge. Note first that the needle has been defined twice: one "normal" and the other "lighted." This is to provide control over lighting with a separate panel lights switch.(L:PanelLight_Flight,enum) 0.5 >=(*force a 0 if no power is available*) (A:Suction pressure,inHg)Notice the section above. This is where the limits for minimum and maximum deflection are listed. The X and Y coordinates are the pixels where the "tip of the needle" will be at the cited values. There are three absolute positions defined for values of 0, 3 and 6 respectively. The sim will interpolate the positions in a "non-linear" fashion for any value within the range of values listed.

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