- Messages
- 542
- Country

I have a timer that is triggered at 6 nm to go to a target ,
it displays a low impact text reminder message ( SET BOMBS ) once every 8 seconds during a maximum duration period of 40 seconds ,
only if zero bombs were set in another instrument ,
if one or more bombs are set it will either switch off or not show ,
at 40 seconds it automatically switches off , it worked nicely .
Code is ,
I then wanted to add text indicating progressive count of bombs dropped and max current set number of bombs ,
only if one or more bombs were set ,
and for a longer duration of 80 seconds .
I tried the following code , in a flight ,
I initially had zero bombs set , the reminder text flashed very briefly , then no more , when it should have .
I then quickly set 12 bombs and the bomb count successfully appeared for the 80 second duration .
In an attempt to get both text/data displays to work as they should , I defined the 2 time durations each with the bomb condition in the Select element
as follows , this worked exactly as desired .
Code is ,
While it works beautifully as required , it looks a mess .
Is there a better way to write this last working code ?
Cheers
Karol
it displays a low impact text reminder message ( SET BOMBS ) once every 8 seconds during a maximum duration period of 40 seconds ,
only if zero bombs were set in another instrument ,
if one or more bombs are set it will either switch off or not show ,
at 40 seconds it automatically switches off , it worked nicely .
Code is ,
Code:
<!-- REMINDER Bomb # NOT set in RIPPLE Inst duration timer trigger -->
<Element>
<Select>
<Value>(L:DistanceTargetPos,nmiles) 6 < (L:DistanceTargetPos,nmiles) 5.8 > and
if{ 1 (>L:TokenDistance,enum) }
(L:TokenDistance,enum) 1 ==
if{ (P:Absolute time, seconds) (>L:Reminder Text START, seconds)
0 (>L:TokenDistance,enum) }
</Value>
</Select>
</Element>
<!-- Flashing reminder that NO bombs set in Ripple Inst -->
<Element>
<Visible>(P:Absolute time, seconds) (L:Reminder Text START, seconds) - 40 <</Visible>
<Element>
<Visible>(L:F111_Nbr_Sum, number) 0.5 < (P:Local time,seconds) 8.0 % 0.95 < *</Visible>
<Element>
<Position X="92" Y="41" />
<FormattedText X="34" Y="24" Font="Tahoma" FontSize="10" LineSpacing="12" Adjust="Left" Color="#FF0000" Bright="Yes">
<String>%SET%
\n%BOMBS%</String>
</FormattedText>
</Element>
</Element>
</Element>
I then wanted to add text indicating progressive count of bombs dropped and max current set number of bombs ,
only if one or more bombs were set ,
and for a longer duration of 80 seconds .
I tried the following code , in a flight ,
I initially had zero bombs set , the reminder text flashed very briefly , then no more , when it should have .
I then quickly set 12 bombs and the bomb count successfully appeared for the 80 second duration .
Code:
<!-- REMINDER Bomb # NOT set in RIPPLE Inst duration timer trigger -->
<Element>
<Select>
<Value>(L:DistanceTargetPos,nmiles) 6 < (L:DistanceTargetPos,nmiles) 5.8 > and
if{ 1 (>L:TokenDistance,enum) }
(L:TokenDistance,enum) 1 ==
if{ (P:Absolute time, seconds) (>L:Reminder Text START, seconds)
0 (>L:TokenDistance,enum) }
</Value>
</Select>
</Element>
<!-- Flashing reminder that NO bombs set in Ripple Inst -->
<Element>
<Visible>(P:Absolute time, seconds) (L:Reminder Text START, seconds) - 40 <</Visible>
<Element>
<Visible>(L:F111_Nbr_Sum, number) 0.5 < (P:Local time,seconds) 8.0 % 0.95 < *</Visible>
<Element>
<Position X="92" Y="41" />
<FormattedText X="34" Y="24" Font="Tahoma" FontSize="10" LineSpacing="12" Adjust="Left" Color="#FF0000" Bright="Yes">
<String>%SET%
\n%BOMBS%</String>
</FormattedText>
</Element>
</Element>
</Element>
<!-- Progressive No released and No of bombs set in Ripple Inst -->
<Element>
<Visible>(P:Absolute time, seconds) (L:Reminder Text START, seconds) - 80 <</Visible>
<Element>
<Visible>(L:F111_Nbr_Sum, number) 0.8 > </Visible>
<Element>
<Position X="92" Y="41" />
<FormattedText X="34" Y="24" Font="Tahoma" FontSize="10" LineSpacing="12" Adjust="Left" Color="#C7C7C7" Bright="Yes">
<Color Value="#349F34"/>
<String>%((L:Bombs_dropped, number))%!02d!%
\n%\{clr2}%((L:F111_Nbr_Sum, number))%!02d!%</String>
</FormattedText>
</Element>
</Element>
</Element>
In an attempt to get both text/data displays to work as they should , I defined the 2 time durations each with the bomb condition in the Select element
as follows , this worked exactly as desired .
Code is ,
Code:
<!-- 1. REMINDER Bomb # NOT set in RIPPLE Inst duration timer trigger and 2. duration of data display -->
<Element>
<Select>
<Value>(L:DistanceTargetPos,nmiles) 6 < (L:DistanceTargetPos,nmiles) 5.8 > and
if{ 1 (>L:TokenDistance,enum) }
(L:TokenDistance,enum) 1 ==
if{ (P:Absolute time, seconds) (>L:Reminder Text START, seconds)
0 (>L:TokenDistance,enum) }
(L:F111_Nbr_Sum, number) 0.5 <
if{ 40 (>L:Time_Interval_Choice, number) }
(L:F111_Nbr_Sum, number) 0.8 >
if{ 80 (>L:Time_Interval_Choice, number) }
</Value>
</Select>
</Element>
<!-- Flashing reminder that NO bombs set in Ripple Inst is visible for 40 seconds -->
<Element>
<Visible>(P:Absolute time, seconds) (L:Reminder Text START, seconds) - (L:Time_Interval_Choice, number) <</Visible>
<Element>
<Visible>(L:F111_Nbr_Sum, number) 0.5 < (P:Local time,seconds) 8.0 % 0.95 < *</Visible>
<Element>
<Position X="92" Y="41" />
<FormattedText X="34" Y="24" Font="Tahoma" FontSize="10" LineSpacing="12" Adjust="Left" Color="#FF0000" Bright="Yes">
<String>%SET%
\n%BOMBS%</String>
</FormattedText>
</Element>
</Element>
</Element>
<!-- Progressive No released and No of bombs set in Ripple Inst is visible for 80 seconds -->
<Element>
<Visible>(P:Absolute time, seconds) (L:Reminder Text START, seconds) - (L:Time_Interval_Choice, number) <</Visible>
<Element>
<Visible>(L:F111_Nbr_Sum, number) 0.8 > </Visible>
<Element>
<Position X="92" Y="41" />
<FormattedText X="34" Y="24" Font="Tahoma" FontSize="10" LineSpacing="12" Adjust="Left" Color="#C7C7C7" Bright="Yes">
<Color Value="#349F34"/>
<String>%((L:Bombs_dropped, number))%!02d!%
\n%\{clr2}%((L:F111_Nbr_Sum, number))%!02d!%</String>
</FormattedText>
</Element>
</Element>
</Element>
While it works beautifully as required , it looks a mess .
Is there a better way to write this last working code ?
Cheers
Karol
Last edited:


