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

P3D v4 Emergency Locator Transmitter Gauge

Messages
1,068
Country
us-northcarolina
Code:
<Gauge Name="Spartan_ELT" Version="1.0">
    <Image Name="ELT_Background.bmp"/>
 <Element>
    <Select>
      <Value>(L:Spartan_ELT,bool)</Value>
         <Case Value="0">
         <Image Name="unpushed.bmp" Luminous="Yes" />
         </Case>
         <Case Value="1">
         <Image Name="pushed.bmp" Luminous="Yes" />
         </Case>
    </Select>
   
  </Element>
 
    <Element>
    <Select>
        <Value>(L:Spartan_ELT,bool)</Value>
            <Case Value="0">
            <Image Name="lightoff.bmp" Luminous="Yes" />
            </Case>
            <Case Value="1">
            <Image Name="lighton.bmp" Luminous="Yes" />
            </Case>
        </Select>

    <Element>
    <Select>
      <Value>
        (L:Spartan_ELT,bool) 1 ==
        (L:dsd_fsx_sound_id_09,number) 0 ==
        and
        if{
          1 (>L:dsd_fsx_sound_id_09,number)
           }

        (L:Spartan_ELT,bool) 0 ==
        (L:dsd_fsx_sound_id_09,number) 0 !=
        and
        if{
          0 (>L:dsd_fsx_sound_id_09,number)
          }
      </Value>
    </Select>
  </Element>
 
  <Mouse>
      <Cursor Type="Hand"/>
      <Tooltip>%((L:Spartan_ELT,bool) 1 ==)%{if}pushed (ON)%{end}%((L:Spartan_ELT,bool) 0 ==)%{if}unpushed (OFF)%{end}</Tooltip>
      <Click>(L:Spartan_ELT,bool) ! (>L:Spartan_ELT,bool)</Click>
           </Mouse>

</Gauge>

I ran this through the xml code checker software but I can't see any error and it doesn't play the wav file. Can someone see where I have an error, please?
 
Does the rest of the gauge operate correctly? If so, perhaps it’s in your ini file?
 
Other sound gauges work correctly, in fact EduHir created the P2 AAS for me and all their sound work correctly. I have dsd_fsx_sound_id recorded and can play it. I can get the background; the pushbutton; light all work as separate gauges if I isolate them. That is why I'm lost when I combine it as a complete gauge. I was thinking it was an xml syntax thing but can't seem to isolate it. If I packaged up the bmp's and the wav are you able to test it as a complete gauge package?
 
maybe </Element> missing?
thank you for that, that was it. Now I just have to figure out how to place the button and the light in the proper place on the background. Any suggestions how you do it? I read somewhere in the past how but I forgot.
 
You need a Position statement. That will place the upper left corner of the image at the specified x,y pixel location on the background image.
 
You need a Position statement. That will place the upper left corner of the image at the specified x,y pixel location on the background image.
I know I do but don't remember how to calculate where that is on the background. I have the XML manuals from FS2X that show what it does but how do you figure out where on thje background that is. Once upon a time someone told me but that is one of my haven't used it in years and don't remember how or where. Can you explain to me how or give me a link to somewhere that details how precisely? I will get back to this on Monday. It's Saturday evening, now and Church tomorrow 3 services and I don't do anything but that and Sunday Dinner. I hope you Sunday is blessed for you and yours.
 
I load the background image into my favorite paint program and point the mouse to the desired spot. The program displays the x,y pixel location.
 
Thank you, that is now I remember it now that you refresh my old memory. LOL. I will try that tomorrow. I remember too from FS2X XML Tutorials that Lesson 1 shows a placement of one bmp over the other and it's up in the upper left corner with no position statement just like mine did in the sim. Back at ya tomorrow. Hope you are having a blessed Sunday.
 
I would like to have you measure the position for the button and the light if you would please and just give me the position values. I have spent the last two hours in Adobe Photoshop which is what I use following the Position Instructions in FS2X xml gauge programming. Here are two bmps. The first one is the one I ask you to measure for me please. I'm curious what you come up with. The second one is what I get with the values which I input and where the button and the light ended up. Hence, the frustration. My position values are:
pushbutton <Position X="22" Y="32"/>
light <Position X="82" Y="32"/>
The error is the gauge in FS Panel Studio when I added it to the panel.
My instructions tell me to measure from the left of the background image to the left edge of the bmp for "X" and from the top of the background image to the top of the bmp for "Y"/.

ELT_For_Position.jpg
spartan elt error.jpg
 
Last edited:
Based on the first bitmap it should be:
pushbutton <Position X="37" Y="21"/>
light <Position X="82" Y="22"/>

Upper left corner of the background bitmap is 0, 0, you take the pushbutton bitmap and place it to the wanted position on the background bitmap, and the upper left corner of the pushbotton bitmap is the position that you need, and in this case it is 37, 21, and for the light it is 82, 22.
 
Thank you Chris, They work perfectly. Now if I can get the gauge to play the wav file, it will be perfectly placed. It took EduHir a lot of posts to me to get the P2 to play. EXCEPT, it only works in FS Panel Studio. I spent the day painstakingly searching for this bad Saprtan ELT file that I created a couple weeks ago in my quest for the correct one which you and Tom helped me to create. Here are the screenshots. The first is the proper Positions for pushbutton and light. The second is in Prepar3D V4.5 and is wrong as you can see. I have deleted it; replaced it; renamed it with no difference. This earlier gauge is NOWHERE. I don't know what else to do. Here is the code:

Code:
<Gauge Name="Spartan_ELT" Version="1.0">
    <Image Name="ELT_Bkgrnd.bmp"/>
 <Element>
    <Select>
      <Value>(L:Spartan_ELT,bool)</Value>
      <Position X="37" Y="21"/>
         <Case Value="0">
         <Image Name="unpushed.bmp" Luminous="Yes" />
         </Case>
         <Case Value="1">
         <Image Name="pushed.bmp" Luminous="Yes" />
         </Case>
    </Select>
  </Element>
 
<Element>
    <Select>
        <Value>(L:Spartan_ELT,bool)</Value>
        <Position X="82" Y="22"/>
            <Case Value="0">
            <Image Name="lightoff.bmp" Luminous="Yes" />
            </Case>
            <Case Value="1">
            <Image Name="lighton.bmp" Luminous="Yes" />
            </Case>
        </Select>
    </Element>

  <Element>
    <Select>
      <Value>
        (L:Spartan_ELT,bool) 1 ==
        (L:dsd_fsx_sound_id_09,number) 0 ==
        and
        if{
          1 (>L:dsd_fsx_sound_id_09,number)
           }

        (L:Spartan_ELT,bool) 0 ==
        (L:dsd_fsx_sound_id_09,number) 0 !=
        and
        if{
          0 (>L:dsd_fsx_sound_id_09,number)
          }
      </Value>
    </Select>
  </Element>
 
  <Mouse>
      <Cursor Type="Hand"/>
      <Tooltip>%((L:Spartan_ELT,bool) 1 ==)%{if}pushed (ON)%{end}%((L:Spartan_ELT,bool) 0 ==)%{if}unpushed (OFF)%{end}</Tooltip>
      <Click>(L:Spartan_ELT,bool) ! (>L:Spartan_ELT,bool)</Click>
           </Mouse>

</Gauge>
Screenshot (157).png
Screenshot (159).png
 
Last edited:
Since I haven't had any more responses, I am going on the premise that you too are as stumped as i am so I am going to delete this and rewrite the code and use NEW bmps for this and trash this gauge as just not working. Thank you all for your help I will post to finish this success I pray and hope.
 
I would rename the gauge you’re using to something else and then reload the panel. If the gauge goes away, then indeed there’s something odd about that gauge. If not, then you have another gauge hiding somewhere.
 
OK the change worked I am using just two bmp's one ELTOFF and one ELTON and they work and there is no more bad gauge in there. But... I do not get any sound from the wav I checked the gauges for the ini and aso the sound too. I also compared it to theP2 that eduhir built for me and it looks right to me but what do I know? I just know I don't get the wav.
 
I guess for whatever reason last night, I am sure by Divine inspiration as often happens to me when I get stuck, I added Doug Dawson's dsd_p3d_xml_sound.dll into the panel and now it works. I read his README that came with it and thought I did everything but that did it. Thank you for all your help. I have only the two bmps complete with buttons off and on AND IT WORKS, YAY! Now I have to write how to put those sound gauges where they all belong in the manual.
 
Back
Top