October 30, 200520 yr 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!
October 30, 200520 yr 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
October 30, 200520 yr 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
October 30, 200520 yr 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.
October 30, 200520 yr Hi,Didn't test, but you could try to add:(L:fuel tank logic,enum) 0 == if{ (>K:FUEL_SELECTOR_ALL) 1 (>L:fuel tank logic,enum) } However, most low wing aircraft are hard coded just to prevent thatYou might have a look here:http://forums.avsim.net/dcboard.php?az=sho...ing_type=searchJan"Beatus Ille Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
October 31, 200520 yr 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.
October 31, 200520 yr 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" Jan "Beatus ille qui procul negotiis..."
October 31, 200520 yr 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.
October 31, 200520 yr 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 FS RTWR SHRS F-111 JoinFS Little Navmap
October 31, 200520 yr 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.
Create an account or sign in to comment