XML: Macros - Set Xpndr Code: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
mNo edit summary
No edit summary
Line 23: Line 23:


@XPDRSet((L:XPDR_Code,number))
@XPDRSet((L:XPDR_Code,number))
________________________
As an alternative, the following will set transponder code to 1200:
'0x' 1200 scat (>K:XPNDR_SET)
and
'0x' (L:XpdrCode, enum) scat (>K:XPNDR_SET)
is equivalent, setting the code to whatever value is stored in (L:XpdrCode, enum)


[[category:Aircraft Design]]
[[category:Aircraft Design]]
[[category:Panel and Gauge Design]]
[[category:Panel and Gauge Design]]

Revision as of 23:49, 9 April 2014

== Transponder Set Macro ==

<Macro id="XPDR Set" Name="XPDRSet">
  <MacroValue>
     @1 s0 10 % l0 10 /
     int 10 % 16 * + l0 100 /
     int 10 % 256 * + l0 1000 /
     int 4096 * + (>K:XPNDR_SET) 
  </MacroValue>
</Macro>

@XPDRSet(1200)

@XPDRSet((L:XPDR_Code,number))

________________________

As an alternative, the following will set transponder code to 1200:

'0x' 1200 scat (>K:XPNDR_SET)

and

'0x' (L:XpdrCode, enum) scat (>K:XPNDR_SET)

is equivalent, setting the code to whatever value is stored in (L:XpdrCode, enum)