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

Preset Button for Transponder

Messages
1,084
Country
us-northcarolina
I know I haven't solved one problem yet and here is another one. I created this gauge and am rather pround that it shows and works, well kinda works...the preset button works but when pushed it 0's the gauge to one digit at the right, 0. I can click the gauge digits and they become visible again and can be incremented or decremented as normal but I want to be able to push the button in an emergency (military) and immediately have 7777. Goes along with my beeper on ELT sound click thing which works thanks again. Here is the code, which I copied the long formula from my XML tutorial book for transponder code set. Can you help me correct this to do what I want? Thanks in advance for the help.

<Gauge Name="elt" Version="1.0">
<Image Name="elt.bmp"/>
<Mouse>
<Tooltip ID=""></Tooltip>
<Help ID=""/>
<Cursor Type="Hand" />
<Click>(L:elt, enum) ! (>L:elt, enum)
(L:memorizednumberindecimal,number)s0 10%10 10 / int1 10%16* + 10 100 / int 10%256* + 10 1000 / int 7777* + (&gt;K:XPNDR_SET)</Click>
</Mouse>
</Gauge>
 
You have a lot of missing spaces and 10's instead of l0's in the formula.
 
Last edited:
Thanks but...

Being almost totally XML illiterate, could you please correct this so that it would work. This is as good as I can do with my nearly no XML knowledge. I don't know where to space and not to space. I copied the code from my XML tutor since he said it had to be this for a Transponder because it treats numbers differently than a radio gauge. Thank you. The Tutor does not explain where or not to put spaces etc.
 
I suppose it should be like this, but not sure about the "1" after the "int":
Code:
<Click>(L:elt, enum) ! (>L:elt, enum)
(L:memorizednumberindecimal,number) s0 10 % l0 10 / int 1 10 % 16 * + l0 100 / int 10 % 256 * + l0 1000 / int 7777 * + (&gt;K:XPNDR_SET)</Click>
If you want to directly set "7777", this is enough:
Code:
<Click>0x7777 (&gt;K:XPNDR_SET)</Click>
(0x indicates hexadecimal number)
 
Thank you

I went back and checked the tutorial and the 1 is a "finger typo" but when I removed it it still did not make any difference to what happens when the button is clicked. I will try your simple text because all I want the emergency button to do IS enter 7777 in the transponder. Thank you for your help. I will try it in a little while and tell if it works as it should. I really appreciate your help.
 
Back
Top