<!-- This guage is for TDS 787 Flasher action   -->
<Gauge Name="TdsFlash" Version="1.0">
<copyright>(c)2007 Hiroshi Igami</copyright>

<Size X="20" Y="20"/>
<Element>
<Select>
<Value> 
          
(L:TdsAdvLight,bool) 1 == if{         
         (P:ZULU TIME, number) 1000 *  (&gt;L:Tds_TIMENOW, number)
         (A:LIGHT STROBE,bool) 1 ==  (A:LIGHT BEACON,bool) 1 ==  || if{

            <!-- Flasher by MS lights action   -->
            (A:LIGHT RECOGNITION,bool) 0 == if{
                 (&gt;K:TOGGLE_RECOGNITION_LIGHTS, bool)
            }
            
            <!-- Reset In case of user changed time  action   -->
            (L:Tds_TIMENOW, number)  (L:Tds_FlasherUpdate, number) 1700 +   &gt;   
            (L:Tds_TIMENOW, number)  (L:Tds_FlasherUpdate, number) 1700 -   &lt;   || if{
               0  (&gt;L:Tds_FlasherUpdate, number)
            }
             
            <!-- When flasher timing    -->
            (L:Tds_FlasherUpdate, number)  (L:Tds_TIMENOW, number)  &lt; if{
               
                 <!-- Set timing for pattern    -->
                 
                 (L:Tds_TIMENOW, number) 1700 + (&gt;L:Tds_FlasherUpdate, number)

                 (L:Tds_TIMENOW, number)   50 + (&gt;L:Tds_WFlasherOn, number)
                 (L:Tds_TIMENOW, number)  200 + (&gt;L:Tds_WFlasherOff, number)
                 (L:Tds_TIMENOW, number)  250 + (&gt;L:Tds_DWFlasherOff, number)
                 (L:Tds_TIMENOW, number)  550 + (&gt;L:Tds_RBeaconOn, number)
                 (L:Tds_TIMENOW, number)  750 + (&gt;L:Tds_RBeaconOff, number)
                 
                 <!-- If Strobe is on .. bright up the low reflextion first  -->
                 (A:LIGHT STROBE,bool) 1 == if{
                     1  (&gt;L:Tds_DWFLASH, bool)
                 }
                 
            }
           
           
            <!-- Strobe driver  -->
            (A:LIGHT STROBE,bool) 1 == if{

                (L:Tds_WFLASH, number) 0 ==
                (L:Tds_WFlasherOn, number)  (L:Tds_TIMENOW, number)  &lt; &amp; if{
                    1  (&gt;L:Tds_WFLASH, number)
                }

                (L:Tds_WFLASH, number) 1 ==
                (L:Tds_WFlasherOff, number)  (L:Tds_TIMENOW, number)  &lt; &amp; if{
                    0  (&gt;L:Tds_WFLASH, number)
                }

                (L:Tds_DWFLASH, number) 1 ==
                (L:Tds_DWFlasherOff, number)  (L:Tds_TIMENOW, number)  &lt; &amp; if{
                    0  (&gt;L:Tds_DWFLASH, number)
                }

            }
            els{
                    0  (&gt;L:Tds_WFLASH, number)
                    0  (&gt;L:Tds_DWFLASH, number)
            }
           
            <!-- Beacon driver  -->
            (A:LIGHT BEACON,bool) 1 == if{
                (L:Tds_RBeaconOn, number)  (L:Tds_TIMENOW, number)  &lt; if{
                     1  (&gt;L:Tds_RBEACON, number)
                }
                (L:Tds_RBeaconOff, number)  (L:Tds_TIMENOW, number)  &lt; if{
                     0  (&gt;L:Tds_RBEACON, number)
                }
            }
            
         }
         els{
            (A:LIGHT RECOGNITION,bool) 1 == if{
                (&gt;K:TOGGLE_RECOGNITION_LIGHTS, bool)
            }
            (L:Tds_DWFLASH, number) 1 == if{
                0  (&gt;L:Tds_DWFLASH, number)
            }
            (L:Tds_WFLASH, number) 1 == if{
                0  (&gt;L:Tds_WFLASH, number)
            }
            (L:Tds_RBEACON, number) 1 == if{
                0  (&gt;L:Tds_RBEACON, number)
            }

         }
}
</Value>
</Select>
</Element>  
</Gauge>
