<!-- This guage is for TDS 737 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) 1500 +   &gt;   
            (L:Tds_TIMENOW, number)  (L:Tds_FlasherUpdate, number) 1500 -   &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) 1500 + (&gt;L:Tds_FlasherUpdate, number)

                 (L:Tds_TIMENOW, number)  100 + (&gt;L:Tds_DWFlasherOn, number)
                 (L:Tds_TIMENOW, number)  150 + (&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)  650 + (&gt;L:Tds_RBeaconOff, number)

                 (L:Tds_TIMENOW, number)   50 +   (&gt;L:Tds_TWFlasherOn, number)
                 (L:Tds_TIMENOW, number)  100  + (&gt;L:Tds_TWFlasherOff, number)
                 
            }
           
           
            <!-- 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) 0 ==
                (L:Tds_DWFlasherOn, number)  (L:Tds_TIMENOW, number)  &lt; &amp; if{
                    1  (&gt;L:Tds_DWFLASH, number)
                }
                
                (L:Tds_DWFLASH, number) 1 ==
                (L:Tds_DWFlasherOff, number)  (L:Tds_TIMENOW, number)  &lt; &amp; if{
                    0  (&gt;L:Tds_DWFLASH, number)
                }

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

                (L:Tds_TWFLASH, number) 1 ==
                (L:Tds_TWFlasherOff, number)  (L:Tds_TIMENOW, number)  &lt; &amp; if{
                    0  (&gt;L:Tds_TWFLASH, number)
                }
            }
            els{
                    0  (&gt;L:Tds_WFLASH, number)
                    0  (&gt;L:Tds_DWFLASH, number)
                    0  (&gt;L:Tds_TWFLASH, 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>
