Hello! Hope I might get some help. Been a long time since I have done any xml gauges!

I found an error in my Spartan Executive ADF gauge. I had essentially copied and chopped up the DC3 radio code, (ADF section) in order to use the dial window and frequency range knob for the Bendix ADF-T-12C radio I made. It looks like the error is in the original DC3 code and I have been plinking around trying to fix it with no success! Everything I have tried makes the gauge disappear!

There appears to be no ADF frequencies between 420 and 490! (I just learned this trying to tune the Lincolnton NDB IZN (432 KHz) I see it in the code but I have pretty much forgotten about all knowlege I had on RPN!

Where I see at least part of the error...

from the DC3 Radio, ADF1 MOUSE Section (red show what i percieve to be the discrepancies)

...
(L:ADF1Frequency,kilohertz) 0.5 - (>L:ADF1Frequency,kilohertz)
(** if Band == 0 Wrap at 190 to 100 **)
(** if Band == 1 Wrap at 420 to 190 **)
(** if Band == 2 Wrap at 970 to 490 **)
(** if Band == 3 Wrap at 1700 to 970 **)
(L:ADF1BandSelectorKnob,enum) 0 == if{ (L:ADF1Frequency,kilohertz) 100 < if{ 189.5 (>L:ADF1Frequency,kilohertz) } g0 }
(L:ADF1BandSelectorKnob,enum) 1 == if{ (L:ADF1Frequency,kilohertz) 190 < if{ 420 (>L:ADF1Frequency,kilohertz) } g0 }
(L:ADF1BandSelectorKnob,enum) 2 == if{ (L:ADF1Frequency,kilohertz) 490 < if{ 969.5 (>L:ADF1Frequency,kilohertz) } g0 }
(L:ADF1BandSelectorKnob,enum) 3 == if{ (L:ADF1Frequency,kilohertz) 970 < if{ 1700 (>L:ADF1Frequency,kilohertz) } }
...

next section...

...
(** if Band == 0 Wrap at 190 to 100 **)
(** if Band == 1 Wrap at 420 to 190 **)
(** if Band == 2 Wrap at 970 to 490 **)
(** if Band == 3 Wrap at 1700 to 970 **)
(L:ADF1BandSelectorKnob,enum) 0 == if{ (L:ADF1Frequency,kilohertz) 189.5 > if{ 100 (>L:ADF1Frequency,kilohertz) } g0 }
(L:ADF1BandSelectorKnob,enum) 1 == if{ (L:ADF1Frequency,kilohertz) 420 > if{ 190 (>L:ADF1Frequency,kilohertz) } g0 }
(L:ADF1BandSelectorKnob,enum) 2 == if{ (L:ADF1Frequency,kilohertz) 969.5 > if{ 490 (>L:ADF1Frequency,kilohertz) } g0 }
(L:ADF1BandSelectorKnob,enum) 3 == if{ (L:ADF1Frequency,kilohertz) 1700 > if{ 970 (>L:ADF1Frequency,kilohertz) } }

:0
...

and finally...

...
(L:ADF2BandSelectorKnob,enum) -- s0 0 < if{ 3 } els{ l0 } d d d d (>L:ADF2BandSelectorKnob,enum)
(** Jump Frequency **)
0 == if{ (L:ADF2Frequency,kilohertz) 190 - 0.00436 * 90 * 100 + near (>L:ADF2Frequency,kilohertz) g0 }
1 == if{ (L:ADF2Frequency,kilohertz) 490 - 0.00208 * 230 * 190 + near (>L:ADF2Frequency,kilohertz) g0 }
2 == if{ (L:ADF2Frequency,kilohertz) 970 - 0.00137 * 480 * 490 + near (>L:ADF2Frequency,kilohertz) g0 }
3 == if{ (L:ADF2Frequency,kilohertz) 100 - 0.01111 * 730 * 970 + near (>L:ADF2Frequency,kilohertz) }
:0


I went in and was changing all the 490 values to 420 (or 419.9 when I thought I should!) But Im pretty sure there is something in the math in this last section that Im not doing that is making the gauge not work.

Odd, the original DC3 bitmap shows the 4 selectable ranges as... 100 to 190 ... 190 to 420 ... 490 to 970... 970 to 1700

Any help with this is greatly appreciated