- Messages
- 187
- Country

This is FSX but I'm using the simpler FS9 XML.
I've been tearing out what little hair I have left trying to
understand why something that SEEMS so simple does
not work.
I am trying to construct code that will be dependent upon
several conditions and am adding them and testing as I
go along.
One variable test is giving me fits.
First, This basic code does what I want:
However adding another variable and it fails to work even
through a display of:
(A:NAV ACTIVE FREQUENCY:2,MHz) yields 117.95 Mhz
Even this simple form does not work for some reason:
I know there are some rather unusual requirements vis a vis
the direct setting of the NAV 1 & 2 frequencies which had
me baffled until I happened upon the XML FAQ posts in
the Avsim Panels and Gauges forum. Seems one needs to
go through the process of converting the frequency to
4 digit BCD form, dropping the leading "1" before attempting
to inject it into the statement (>K:NAV2_RADIO_SET).
I'm wondering what hoop I may need to jump through
to be able to test the tuned frequency of NAV 2.
Right now I have to do a brute force set mof the required
frequency which is not the way I wish to go as I want the
user to be able to detune that radio in order to deactivate
the feature I am coding.
TIA for any help/advice.
Paul
I've been tearing out what little hair I have left trying to
understand why something that SEEMS so simple does
not work.
I am trying to construct code that will be dependent upon
several conditions and am adding them and testing as I
go along.
One variable test is giving me fits.
First, This basic code does what I want:
Code:
<Element>
<Select>
<Value>1 4 (A:Nav2 dme, nmiles) rng
if{ 1 (>L:In_ZONE,bool) }
els{ 0 (>L:In_ZONE,bool) }
</Value>
</Select>
</Element>
However adding another variable and it fails to work even
through a display of:
(A:NAV ACTIVE FREQUENCY:2,MHz) yields 117.95 Mhz
Code:
<Element>
<Select>
<Value>1.5 4 (A:Nav2 dme, nmiles) rng (A:NAV ACTIVE FREQUENCY:2,MHz) 117.95 == &&
if{ 1 (>L:In_ZONE,bool) }
els{ 0 (>L:In_ZONE,bool) }
</Value>
</Select>
</Element>
Even this simple form does not work for some reason:
Code:
<Element>
<Select>
<Value>(A:NAV ACTIVE FREQUENCY:2,MHz) 117.95 ==
if{ 1 (>L:In_ZONE,bool) }
els{ 0 (>L:In_ZONE,bool) }
</Value>
</Select>
</Element>
I know there are some rather unusual requirements vis a vis
the direct setting of the NAV 1 & 2 frequencies which had
me baffled until I happened upon the XML FAQ posts in
the Avsim Panels and Gauges forum. Seems one needs to
go through the process of converting the frequency to
4 digit BCD form, dropping the leading "1" before attempting
to inject it into the statement (>K:NAV2_RADIO_SET).
I'm wondering what hoop I may need to jump through
to be able to test the tuned frequency of NAV 2.
Right now I have to do a brute force set mof the required
frequency which is not the way I wish to go as I want the
user to be able to detune that radio in order to deactivate
the feature I am coding.
TIA for any help/advice.
Paul
Last edited:
