• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX No Reason At All IMO

Messages
967
Country
us-northcarolina
I have installed two switches onto my panel RIGHT OUT of the cpt toggles without any changes whatsoever. I also updated the aircraft.cfg so that it has a primer and an electric fuel pump. by changing the first 0 in each aircraft.cfg entry to a 1 which I understand is NO to YES, true? Here are the two codes:

Code:
<Gauge Name="Primer" Version="1.0">
   <Element>
      <Select>
         <Value>(A:ENGINE PRIMER,bool)</Value>
         <Case Value="0">
            <Image Name="switch_off.bmp" ImageSizes="39,59"/>
         </Case>
         <Case Value="1">
            <Image Name="switch_on.bmp" ImageSizes="39,59"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Help ID="HELPID_CESS_PRIMER_SWITCH"/>
      <Cursor Type="Hand"/>
      <Click Event="TOGGLE_PRIMER"/>
   </Mouse>
</Gauge>

Code:
<Gauge Name="FuelPump 1" Version="1.0">
   <Element>
      <Select>
         <Value>(A:General eng1 fuel pump switch,bool)</Value>
         <Case Value="0">
            <Image Name="switch_off.bmp" ImageSizes="35,31"/>
         </Case>
         <Case Value="1">
            <Image Name="switch_on.bmp" ImageSizes="35,31"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Tooltip ID="">Fuel Pump 1</Tooltip>
      <Help ID="Boost Pump"/>
      <Cursor Type="Hand"/>
    <Click Event="TOGGLE_ELECT_FUEL_PUMP1"/>
   </Mouse>
</Gauge>

Neither switch moves from on or off position it just there. There IS a hand click on the panel but nothing happens. What is missing? This is stock code toggles from cpt_toggles with their switches.
 
Last edited:
Messages
258
Country
ireland
I reckon

<Value>(A:ENGINE PRIMER,bool)</Value>

and

<Value>(A:General eng1 fuel pump switch,bool)</Value>

need to be looked at.

I can find neither variable in the list of variables that I use at


Walter
 

tgibson

Resource contributor
Messages
11,342
Country
us-california
In the FSX SDK the format used for the fuel pump variable is listed as GENERAL ENG FUEL PUMP SWITCH:index

And the variable I see for the primer is RECIP ENG PRIMER:index

Not tested by me.
 
Messages
150
Country
england
This help?..


XML:
<!-- ======================= Primer L/R ========================= -->
    <Element>
        <Position X="20" Y="79" />
        <Select>
            <Value>(A:Recip eng primer:1,bool)</Value>
            <Case Value="0">
                <Image Name="top_popup_switch_primer_left_off.bmp" />
            </Case>
            <Case Value="1">
                <Image Name="top_popup_switch_primer_left_on.bmp" />
            </Case>
        </Select>
    </Element>
    <Element>
        <Position X="68" Y="82" />
        <Select>
            <Value>(A:Recip eng primer:2,bool)</Value>
            <Case Value="0">
                <Image Name="top_popup_switch_primer_right_off.bmp" />
            </Case>
            <Case Value="1">
                <Image Name="top_popup_switch_primer_right_on.bmp" />
            </Case>
        </Select>
    </Element>
    <!-- ======================= Booster L/R ======================== -->
    <Element>
        <Position X="113" Y="83" />
        <Select>
            <Value>(A:General eng fuel pump switch:1,bool)</Value>
            <Case Value="0">
                <Image Name="top_popup_switch_booster_pump_left_off.bmp" />
            </Case>
            <Case Value="1">
                <Image Name="top_popup_switch_booster_pump_left_on.bmp" />
            </Case>
        </Select>
    </Element>
    <Element>
        <Position X="163" Y="85" />
        <Select>
            <Value>(A:General eng fuel pump switch:2,bool)</Value>
            <Case Value="0">
                <Image Name="top_popup_switch_booster_pump_right_off.bmp" />
            </Case>
            <Case Value="1">
                <Image Name="top_popup_switch_booster_pump_right_on.bmp" />
            </Case>
        </Select>
    </Element>
 
Messages
967
Country
us-northcarolina
there is only one primer and one fuel pump each but I will try the left hand code from each one and see what happens in just a few moments and get back here, thanks. OK I copied down each code and used just the boost left the first portion. I added Gauge Name and </Gauge> XML Evaluator says no errors in the code. I removed the position because it first gave me a weird gauge and when I did that I loads up perfectly. BUT the switch still does not fuction. AND I SAY WHY NOT? Everything looks right.

So here is what I have now:

Code:
<!-- ======================= Booster ======================== -->

<Gauge Name="FuelPump 1" Version="1.0">
    <Element>
         <Select>
            <Value>(A:General eng fuel pump switch:1,bool)</Value>
            <Case Value="0">
                <Image Name="switch_off.bmp" />
            </Case>
            <Case Value="1">
                <Image Name="switch_on.bmp" />
            </Case>
        </Select>
    </Element>
   <Mouse>
      <Tooltip ID="">Fuel Pump 1</Tooltip>
      <Help ID="Boost Pump"/>
      <Cursor Type="Hand"/>
    <Click Event="TOGGLE_ELECT_FUEL_PUMP1"/>
   </Mouse>
</Gauge>
 
Last edited:
Messages
967
Country
us-northcarolina
In the FSX SDK the format used for the fuel pump variable is listed as GENERAL ENG FUEL PUMP SWITCH:index

And the variable I see for the primer is RECIP ENG PRIMER:index

Not tested by me.
I tried the GENERAL ENG FUEL PUMP SWITCH:index, bool and the switch is still not active. NO UP OR DOWN so something is wrong but I can't find what either. I also tried to look for another aircraft in fsx with a fuel pump to see how they coded it but could not find any in my hanger of pretty much default aircraft.

downloading a T34 and a beech v tail to see if they have fuel pumps and how they are coded because I am really stumped.
 
Last edited:
Messages
967
Country
us-northcarolina
Well so much for the V-35 it uses all Baron and Bravo gauges which do not have a fuel pump. Waiting on the T34 Mentor. Hope that it has a fuel pump. Its 101MB so it should have its own gauges I hope. No such luck. First, they were all .gau not xml and then I WAS able to read the panel.cfg and there was no fuel pump. All I want is to see what someone did that works switch on off and all.

This is from the Daviator Stearman Primer gauge and I had to take a "Key code" out and it works. It does NOT have a fuel pump so I am still looking for help there.

Code:
<Gauge Name="Primer_Toggle"
Version="1.0">
   <Element>
      <Select>
         <Value>(G:Var1,bool)</Value>
         <Case Value="0">
            <Image Name="primer_off.bmp"
ImageSizes="55,62"/>
         </Case>
         <Case Value="1">
            <Image Name="primer_on.bmp"
ImageSizes="55,62"/>
         </Case>
      </Select>
   </Element>



   <Mouse>
       <Help
ID="HELPID_CESS_PRIMER_SWITCH"/>
      <Cursor Type="Hand"/>
<Click>(G:Var1) ! (&gt;G:Var1) </Click>
   </Mouse>
</Gauge>
 
Last edited:
Messages
258
Country
ireland
That Stearman Primer Gauge, as it is coded, would purely be for show. No priming takes place. The switch just moves.
 
Messages
150
Country
england
there is only one primer and one fuel pump each but I will try the left hand code from each one and see what happens in just a few moments and get back here, thanks. OK I copied down each code and used just the boost left the first portion. I added Gauge Name and </Gauge> XML Evaluator says no errors in the code. I removed the position because it first gave me a weird gauge and when I did that I loads up perfectly. BUT the switch still does not fuction. AND I SAY WHY NOT? Everything looks right.

So here is what I have now:

Code:
<!-- ======================= Booster ======================== -->

<Gauge Name="FuelPump 1" Version="1.0">
    <Element>
         <Select>
            <Value>(A:General eng fuel pump switch:1,bool)</Value>
            <Case Value="0">
                <Image Name="switch_off.bmp" />
            </Case>
            <Case Value="1">
                <Image Name="switch_on.bmp" />
            </Case>
        </Select>
    </Element>
   <Mouse>
      <Tooltip ID="">Fuel Pump 1</Tooltip>
      <Help ID="Boost Pump"/>
      <Cursor Type="Hand"/>
    <Click Event="TOGGLE_ELECT_FUEL_PUMP1"/>
   </Mouse>
</Gauge>

I dont see anything obvious why it wont work.

For clarity, here the mouse section from the code i posted above; but its pretty identical so i dont think it'll help but hey ho, here we go;

XML:
<!-- Booster Pump L/R -->
        <Area Left="115" Top="92" Right="196" Bottom="149">
            <Help ID="HELPID_GAUGE_SWITCH_FUEL_PUMP" />
            <Area Right="41">
                <Tooltip ID="TOOLTIPTEXT_ENG1_FUEL_PUMP" />
                <Cursor Type="Hand" />
                <Click Event="TOGGLE_ELECT_FUEL_PUMP1" />
            </Area>
 
Messages
967
Country
us-northcarolina
If the air file which by the way I should have checked, I do have a program to open it, and see what it says in there for a primer. Also for a fuel pump. I will try that mouse code and see. No luck. It shows in FS Panel studio but is missing in FSX. If it is REALLY un-necessary then I may just put a cpt toggle dummy switch there which clicks but doesn't do anything as said about the Stearman primer. Thank you for trying.
 

tgibson

Resource contributor
Messages
11,342
Country
us-california
Do you have:

electric_pump=1

in the Fuel section of the plane's aircraft.cfg file?
 
Messages
967
Country
us-northcarolina
Do you have:

electric_pump=1

in the Fuel section of the plane's aircraft.cfg file?
that was it! I had "fuel pump" =1 under electric but 0 under the fuel section so it's fixed now thanks for the heads up this is closed issue now
 
Messages
967
Country
us-northcarolina
I have been able to add the low fuel pressure lamp gauge and the low oil pressure lamp gauge into the spartan panel and both work. There is a third warning lamp the generator lamp that I created code for using the above low pressure gauges as examples and code from the sim variables list (I thought, back here again) ran the code through the xml validator which said no errors but it does not load onto the panel. Here is the code if you can see what might be wrong please.

Code:
<Gauge Name="Generator Lamp" Version="1.0">
   <Image Name="lampoff.bmp" Transparent="Yes" Luminous="Yes"/>
   <Element>
     <Failures>
       <SYSTEM_ELECTRICAL_PANELS Action="NoDraw" />
     </Failures>
     <Visible>(A:ELECTRICAL GENALT ACTIVE,bool)</Visible>
     <Image Name="lampon.bmp" Bright="Yes" Transparent="Yes"/>
   </Element>
   <Mouse>
     <Tooltip ID="TOOLTIPTEXT_ELECTRICAL GENALT ACTIVE"/>
   </Mouse>
</Gauge>
 
Messages
258
Country
ireland
As Maddz said above .

Also I cannot test this, but I cannot find the failure you invoke in the list of failures in P3DV5.

I ignore the <Failures> completely in any gauge I create, and delete the section in any gauge I alter or reuse, so I am not sure if your failure name is correct.

The structure of the gauge works fine.

I have never seen Transparent="Yes" before in a gauge, I wonder what it achieves, it seems illogical to make something like a lamp transparent, anyway the lamp appears fine despite it.

Failures.jpg
 
Messages
967
Country
us-northcarolina
I will remove the failure line; add the 1 and take out the transparency and see what happens. Maybe the 1 is all it needs but we'll see. All of this code is from a fuel pressure xml gauge code that perfectly works. That is why I used it and just tried to alter it for the generator/alternator. I'll be back!
 
Messages
967
Country
us-northcarolina
I will never learn. The gauge works perfectly...when I save the code as XML in Notepad++ and not as Normal Text. I have not tested them in FSX yet but as far as FS Panel Studio is concerned they are ok. Anyway, again thank you to you all. I have a challenge for the very last gauge on the panel , it's the "NOSE DOWN" GAUGE which looks like the attached jpg and I don't have a clue how to approach it. I hope that you can help and the panel will be totally complete. I have the texture repaint in the thread at SOH with its highly polished aluminum finish. Here is a photo of the gauge
 

tgibson

Resource contributor
Messages
11,342
Country
us-california
That is a trim gauge. Just use the code from any trim gauge and change it as needed. You will need to modify to fit your bitmaps.

Here is the code from the FS2004 Beech Baron, it includes a wheel element and a slider element. You need only the slider so I have deleted the wheel. It is Pitch Trim.xml in Beech_Baron.cab. It has no background bitmap; it uses the main panel bitmap. You can add that if you wish.

XML:
<Gauge Name="Pitch Trim" Version="1.0">
   <Element>
      <Image Name="PitchTrim_Pointer.bmp" ImageSizes="2,4,3,5">
         <Axis X="2" Y="2"/>
      </Image>
      <Shift>
         <Value Minimum="-15" Maximum="15">(A:Elevator Trim Position,degrees)</Value>
         <Nonlinearity>
            <Item Value="-15" X="15" Y="3"/>
            <Item Value="0" X="15" Y="30"/>
            <Item Value="+15" X="15" Y="57"/>
         </Nonlinearity>
      </Shift>
   </Element>
   <Mouse>
      <Help ID="HELPID_GAUGE_PITCH_TRIM"/>
      <Tooltip ID="TOOLTIPTEXT_PITCH_TRIM"/>
      <Area Bottom="30">
         <Click Event="ELEV_TRIM_DN" Repeat="Yes" MouseWheelFlip="Yes"/>
         <Cursor Type="DownArrow" Repeat="Yes"/>
      </Area>
      <Area Top="30">
         <Click Event="ELEV_TRIM_UP" Repeat="Yes" MouseWheelFlip="Yes"/>
         <Cursor Type="UpArrow"/>
      </Area>
   </Mouse>
</Gauge>

Hope this helps,
 
Top