XML Woes Again!
Posted: 18 Oct 2007, 15:19
Having twubble with my decision warning lights for Shack Mk2.
<Gauge Name="Decision Height Light" Version="1.0">
<Image Name="DecHtBgrd.bmp"/>
<Element>
<Position X="0" Y="0"/>
<Select>
<Value>(A:Radio height, feet) s0 900 > if{ 0 } els{ l0 (A:Decision height, feet) < if{ 1 } els{ l0 300 > 2 + } }</Value>
<Failures>
<SYSTEM_ELECTRICAL_PANELS Action="0"/>
</Failures>
<Case Value="1">
<Image Name="DecHtRed.bmp" />
</Case>
<Case Value="2">
<Image Name="DecHtOrng.bmp" />
</Case>
<Case Value="3">
<Image Name="DecHtGrn.bmp" />
</Case>
</Select>
</Element>
<Tooltip>Decision Height Warning Lights</Tooltip>
</Gauge>
Prob is this only gives me two lights (and if I am right only cos the condition test is incorrect)
Here's how I read it: Alt greater than 900 then the condition statement is not evaluated. Less than 900 generates a 1 and the if section is evaluated. Below Decis Height generates 'true' a one is stored in sierra0, the next bit I don't understand as it appears to checking that Decis Ht is greater than 300 (why). I started out with code from another Radio Alt gauge and modified to suit Shack. Can I get 3 lights using this method. And how, as this is my first attempt at a condition test with 'If'.
Hope someone can help. Else if && or || on error goto Shack in rubbish bin.
Paul
<Gauge Name="Decision Height Light" Version="1.0">
<Image Name="DecHtBgrd.bmp"/>
<Element>
<Position X="0" Y="0"/>
<Select>
<Value>(A:Radio height, feet) s0 900 > if{ 0 } els{ l0 (A:Decision height, feet) < if{ 1 } els{ l0 300 > 2 + } }</Value>
<Failures>
<SYSTEM_ELECTRICAL_PANELS Action="0"/>
</Failures>
<Case Value="1">
<Image Name="DecHtRed.bmp" />
</Case>
<Case Value="2">
<Image Name="DecHtOrng.bmp" />
</Case>
<Case Value="3">
<Image Name="DecHtGrn.bmp" />
</Case>
</Select>
</Element>
<Tooltip>Decision Height Warning Lights</Tooltip>
</Gauge>
Prob is this only gives me two lights (and if I am right only cos the condition test is incorrect)
Here's how I read it: Alt greater than 900 then the condition statement is not evaluated. Less than 900 generates a 1 and the if section is evaluated. Below Decis Height generates 'true' a one is stored in sierra0, the next bit I don't understand as it appears to checking that Decis Ht is greater than 300 (why). I started out with code from another Radio Alt gauge and modified to suit Shack. Can I get 3 lights using this method. And how, as this is my first attempt at a condition test with 'If'.
Hope someone can help. Else if && or || on error goto Shack in rubbish bin.
Paul