Jump to content
Sign in to follow this  
Alba

Displaying total fuel load.

Recommended Posts

Hello again folks.I have made a multi function display bmp and would like to have a/c info displayed on it by using toggle switches and popup windows. I am using Nick Pikes excellent tutorial as a guide but lack of understanding is making it difficult for me.After receiving help here already my power on/off button works fine and I can use that code elsewhere now that I know how it works. I have made a copy of the display part of the MFD bmp and am using that as popup windows. The toggle switches work fine. I have placed Eric Marciano's Radar Gauge on one of these windows and it works fine via the toggle.This is now where my lack of knowledge kicks in. I would like to now make a gauge which displays the total amount of fuel on board my a/c. The gauge would be placed on another of these popup windows just like the radar gauge. The window toggles ok, I know that by the use of a small test mark I painted on it. However my fuel gauge does not.I don't wish that I need help with every gauge I try to make but a bit of help as to where I am going wrong would help my understanding.Could someone check this code and explain why the gauge is not showing up on the popup display window. I have made a background bmp for the gauge. Bear in mind that I am using bits of code from the tutorial but may not be using them correctly and in the right order. Sorry for the long read!!(A:Circuit general panel on, bool)(A:Circuit avionics on,bool) &&%((A:Total Fuel Quantity,lbs))%!07d!Thanks for any help.Regards...Kenny

Share this post


Link to post
Share on other sites

Hi,Mind the spaces between the variables.You can do with one element.So:(A:Circuit general panel on, bool) (A:Circuit avionics on,bool) and%((A:Total Fuel Quantity,lbs))%!07d!Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan, thanks again for your reply.Unfortunately it still will not work. I have reduce it down to just a basic bmp gauge but even that must be wrong as it does not show up either.I have repainted my test square on the popup window and that appears ok when I key the rocker switch. In Panel Studio my new gauge bmp shows up ok and lets me place it on the fuel display popup window. i I assume the gauge is in place.However, like I said the gauge does not show in the sim although the popup display window does.I have entered these few lines of code code as per the tutorial expecting to see my gauge bmp (which has this text on it) TOTAL FUEL...lbs. However it does not appear on the window.Please excuse my lack of knowledge as I know how frustrating it can be when a person does not "see" something. Once I know what I am doing wrong I will progress on. Here's the code :-The tutorial says that should place the gauge bmp on the window but it doesn't.Please stick with me on this as I would like to be able to at least make basic gauges with XML.Regards again...Ken

Share this post


Link to post
Share on other sites

Hi,You must split GaugeName into this:Otherwise the gauge won't load.To test whether a gauge loads or not, just open the XML file with Internet Explorer, if it's ok the complete code will show, otherwise a message should appear in the text pointing out the offending section of code.Tom

Share this post


Link to post
Share on other sites

Hello Tom.Thanks for coming in to help. I am learning small snippets of XML code and obviously need to be more careful in my interpretation of the tutorial. Thanks also for the tip re. Internet Explorer. It highlighted my errors just like you said it would. That will be a great tool for me now. I will now go back and add more code untill I get my desired effect.Thanks again.Regards...Ken

Share this post


Link to post
Share on other sites

Hello again Tom.That worked just fine for me but you knew that!! I have also discovered XML SPY which I think will error check my code as I go along. I do not think that Notepad ++ does that. I will now go back to the tutorial and try to get the gauge to display my fuel load. I will also try and get it to display individual tank settings. So watch this space Regards...Ken

Share this post


Link to post
Share on other sites
Guest jprintz

Not to make an obvious point, but you DO have the Notepadd ++ XML plugins installed, right? That installation needs to be done apart from the original installation. The program can check XML on the fly, or with 1 key press, among many other things. I find that, with those XML plugins installed, Notepadd++ is easily the best notepad replacement program I've found. And I've tried at least 10 of them. This wonderful program has saved me TONS of time. It's not that the program has any one big advantage over its competitors, but that it has several dozen smaller, more subtle time- and sanity-savers.

Share this post


Link to post
Share on other sites

Hello jprintz.No, I didn't have the plugin. Thanks for the info. I am really keen to learn how to use XML for my gauges. However, this little bit of code is driving me nuts. I have redone it several times using snippets of code from the FS2X tutorial. I can get it to display the 123etc line of text using the part but I cannot get it to display the displayed altitude variable as per the tutorial nor my desired total fuel load.I will keep trying. I am assuming that there are no errors in the tutorial and have bought a book on XML which explains more about the syntax.Regards...Kenny

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...