Jump to content
Sign in to follow this  
Guest greenco

Fuel Quantity Gauge Problem

Recommended Posts

Guest greenco

I have made a digital "Fuel Quantity" gauge for use with a two tank configuraion and I am using it on a number of aircraft panels. When I load an aircraft, with this gauge on the panel, it always has "Both Tanks" selected and this is what I want to happen. However, I just put it on a panel for the default FS9 Mooney Bravo, and when I load it, the "Right Main" tank is always selected. Does anyone know why this happens or of a bettter way to code the gauge?ThanksGauge code follows:Fuel Load (Gal)LR(A:FUEL TANK SELECTOR 1, enum)(A:FUEL TANK SELECTOR 1, enum)(A:FUEL TANK SELECTOR 1, enum)(A:Circuit general panel on, bool)(G:Var2) 0 == (A:Avionics master switch, bool) &&%((A:FUEL TANK LEFT MAIN QUANTITY, Gallons))%!5.1f!%((A:FUEL TANK RIGHT MAIN QUANTITY, Gallons))%!5.1f!

Share this post


Link to post
Share on other sites
Guest ridgell

just from a cursory look, i can see how to shorten your code a bit.(A:FUEL TANK SELECTOR 1, enum) you don't need to create new elements, for what is a single (A:FUEL TANK SELECTOR 1,enum) with the same position.if you are useing your own bitmaps draw the bitmap with the case=0 or 'base state' in the picture on the background, then you can eleminate one of the case= profiles, also, while i see it often, bright=0 multiline=0 are usually redundent. if the parameter is 'no' dont say anything, you only need to specify 'yes'.i also dont see right away why you have the 1st section contained inside its own that is usually when you want to the whole section...you dont seem to use the from what i see

Share this post


Link to post
Share on other sites
Guest greenco

Thanks ridgellI cleaned up the code and it looks a lot better, but the problem still exists. It has something to do with the Mooney, but to save my life I can't find it. To make sure it was not my gauge, I replaced my fuel selector with the default selector, from the Cessna, and it also loads with the right main tank selected. I have looked in the "air" file and the "cfg" file and I can not find a cause. If you can spot a cause would you let me know.Thanks again

Share this post


Link to post
Share on other sites
Guest ridgell

Fuel Load (Gal)LR(A:FUEL TANK SELECTOR 1,enum)(A:Circuit general panel on,bool) (A:Avionics master switch, bool) ; & &%((A:FUEL TANK LEFT MAIN QUANTITY,Gallons))%!5.1f!%((A:FUEL TANK RIGHT MAIN QUANTITY,Gallons))%!5.1f!took a shot at you're code. works ok. i did not have the benifit of seeing your bitmaps, but i didn't change any thing about appearance. i shortened it up like i said above, put area inside its own element because thats where you used the . unless there is more of this gauge, you did not have a G:Var in the code so i go rid of that from the visible qualification. ( the G:var could only be used in this gauge...unlike an L:Var which can be read by other gauges ) do not see an ini or any reason in the aircraft cfg for the different tank selection start up for the baron in my folder, but i cant swear mine is a default plane...lotta changes over lotta time here bubba. but hey! we shortened up your code...thats something. & is & only small case.it just wont do right here in the forum.

Share this post


Link to post
Share on other sites
Guest greenco

ThanksI cleaned the code as ridgell suggested and it looks a lot cleaner.Jan, I tried inserting your code sample and nothing changed. It still loads with the right main tank selected. Once I click on the "All" tanks selector, it stays selected, until I close down the sim or select another tank. I will just have to make sure both tanks are selected before flying.Thanks for your help.

Share this post


Link to post
Share on other sites

Hi,Did you try to save the situation with the mooney, close the sim and startup again with that situation?Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest greenco

Thanks Jan, I saved the flight and then selected it, making it the default flight, and the fuel selector stayed on both tanks. Now when I start the sim, the Mooney loads with both tanks selected.

Share this post


Link to post
Share on other sites

There also could be a mistake in the .AIR file from MSSections 525, 526 repectively -"Fuel tank number"Mooney 1,1172 1,2182 1,2208 1,2737 1,2, sect. 531 = 3777 1,2, sect. 531 = 3DC-3 no entryComet no entryFord no entryEven though the aircraft.cfg may state otherwise the .AIR file probably gets loaded after the AIRCRAFT.cfg. Section 526 gets loaded last and is the right tank... Just a thought.As it looks newer aircraft donot have tank entries any more and rely on the aircraft.cfg. Either change the Mooney to 1,2 in the air file, or, just remove the records and let the aircraft.cfg do its job... Make a back-up !!!! Regards,Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest greenco

Thanks spokes2112, I thought you had found the problem, but neither of the suggestions made any difference. I will load my saved flight each time and the correct fuel tank selection will be loaded.

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