Sign in to follow this  
Guest

Set a default value in XML gauges

Recommended Posts

Hi all,How can I set a default value for and XML gauge? I am programming an engine fuel valve switch in XML format, and I want that when the aircraft load in FS2002, the fuel valve is in the off position.I have attempted it with the following code but it doesn't work:(A: GENERAL ENG1 FUEL VALVE,bool) 0 ==(A:GENERAL ENG1 FUEL VALVE,bool)Thank you for your help.greetingsRafael

Share this post


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

Rafael, A simple way is to use a (G:Var) which are always reset to zero on initial gauge load, once the gauge loads it will check the value of the fuel selector and if necessary turn it off and toggle G:Var to 1.(G:Var1) 0 == if{ 1 (>G:Var1) + (A:GENERAL ENG1 FUEL VALVE, bool) 1 == if{ (>K:TOGGLE_FUEL_VALVE_ENG1) } }Hope this helps. Regards,RomanProject 737-400Note, the way it looks here on the forum is different since HTML has processed it. On paper the " < " would be " & l t ; " , the " > " would be " & g t ; " and the " & " would be " & a m p ; ". All without the quotes and remove spaces between characters.

Share this post


Link to post
Share on other sites

Hi RomanThank you very much for your help. Your code works fine. My idea is creating a panel that load in a "cold and dark cockpit". Any others ideas?Again, thank you for your help.greetingsRafael

Share this post


Link to post
Share on other sites

>Hi Roman >>Thank you very much for your help. Your code works fine. My >idea is creating a panel that load in a "cold and dark >cockpit". Any others ideas? Ha! A person after my own heart... I too have been developing that concept with my little Socata TB20GT project. I want the simmer to step into a totally 'cold and dark cockpit,' and have to follow the real life startup procedures, beginning with finding the cockpit "courtesy light switch" (assuming that it's a night flight, of course!). The courtesy light is the only device in the a/c that bypasses the master battery switch, and is on a timer circuit to prevent battery drain should someone forget to turn it off manually... :)

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