'##############
'INEO - TACTILEO SIMULATION SCRIPT
'##############

'Dispositif de navigation Tactileo

'(c) 07.03.2023 NEROSY

'Script Version: 1.1
'Omsi release: 2.3.004

'Needs:
'- Elec

'Revision History

'- NEROSY                   16.03.2023    Création de la base 3D, scripts et texture
'- NEROSY                   13.04.2023    Ajout de la fonction SIV (Afficheur défilant intérieur)
'- Florian D (From NEROSY)  13.04.2023    Création de la police d'écriture 1410N2E1

'----------------------
' Triggers
'----------------------

{trigger:tactileo_welcome_validation}
    (L.L.tactileo_mode) 5 =
    {if}
        0 (S.L.tactileo_notouch_delay_timer)
        6 (S.L.tactileo_mode) 
    {endif}
{end}

{trigger:tactileo_login_cancel}
    (L.L.tactileo_mode) 6 =
    {if}
        5 (S.L.tactileo_mode)
    {endif}

    (L.L.tactileo_mode) 7 =
    {if}
        6 (S.L.tactileo_mode)
    {endif}
{end}

{trigger:tactileo_input_0}
    0 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_1}
    1 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_2}
    2 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_3}
    3 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_4}
    4 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_5}
    5 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_6}
    6 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_7}
    7 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_8}
    8 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_9}
    9 (M.L.tactileo_num_input)
    0 (S.L.tactileo_notouch_delay_timer)
{end}

{trigger:tactileo_input_confirm}
    0 (S.L.tactileo_notouch_delay_timer)
    (L.L.tactileo_mode) 6 =
    {if}
        (L.L.tactileo_input) (S.L.tactileo_ligne)
        (L.$.tactileo_input_text) (S.$.tactileo_ligne_TEXT)
        "" (S.$.tactileo_input_text)
        0 (S.L.tactileo_input) (S.L.tactileo_input_count)
        (M.V.GetDepotStringGlobal) "St-Servan" $=
        {if}
            (L.L.tactileo_ligne) 20 = (L.L.tactileo_ligne) 23 = ||
            {if}
                "C" (L.$.tactileo_ligne_TEXT) $+ (S.$.tactileo_ligne_TEXT)                
            {endif}            
        {endif}

        7 (S.L.tactileo_mode)
    {else}
        (L.L.tactileo_mode) 7 =
        {if}
            (L.L.tactileo_input) (S.L.tactileo_train)
            (L.L.tactileo_train) "02" $IntToStrEnh $+ (S.$.tactileo_train_TEXT)
            "" (S.$.tactileo_input_text)
            0 (S.L.tactileo_input) (S.L.tactileo_input_count)
            8 (S.L.tactileo_mode)
            0 (S.L.tactileo_timer_input_check)
        {endif}
    {endif}

{end}

{trigger:tactileo_input_remove_one}
    (L.L.tactileo_mode) 6 =
    {if}
        0 (S.L.tactileo_input) (S.L.tactileo_input_count)
        "" (S.$.tactileo_input_text)
    {endif}

    (L.L.tactileo_mode) 7 =
    {if}
        0 (S.L.tactileo_input) (S.L.tactileo_input_count)
        "" (S.$.tactileo_input_text)
    {endif}
{end}

{trigger:tactileo_FS}
    (L.L.tactileo_mode) 10 =
    {if}
        1 (S.L.tactileo_screen_mode)
        11 (S.L.tactileo_mode)
    {endif}
{end}

{trigger:tactileo_confirm_FS}
    (L.L.tactileo_mode) 11 =
    {if}
        5 (S.L.tactileo_mode) 
        0 (S.L.tactileo_schedule_active) (S.L.tactileo_train) (S.L.tactileo_ligne) (S.L.tactileo_input) (S.L.tactileo_input_count)
        "" (S.$.tactileo_train_TEXT)
        "" (S.$.tactileo_ligne_TEXT)
        "" (S.$.tactileo_input_text)
    {endif}
{end}

{trigger:tactileo_cancel_FS}
    (L.L.tactileo_mode) 11 =
    {if}
        10 (S.L.tactileo_mode)
        2 (S.L.tactileo_screen_mode)        
    {endif}
{end}

'----------------------
' Init
'----------------------

{macro:tactileo_init}
    1 (S.L.IBIS_TerminusCode_auto_set)
{end}

{macro:hano_1410N2E1_init}
    1 (S.L.HanoverPass_SyncTimer)
    1 (S.L.HanoverPass_StatusDisplaying) (S.L.HanoverPass_power)
{end}

'----------------------
' Frame
'----------------------

{macro:tactileo_elec}
    (M.L.tactileo_strings) (M.L.tactileo_delay_scale) (M.L.tactileo_departure_BlinkerFunction) (M.L.HanoverPass_frame)
    (L.L.elec_busbar_main) (C.L.elec_busbar_minV) >
    {if}
        (L.L.tactileo_init_timer) (L.S.Timegap) + (S.L.tactileo_init_timer) s0 5 <
        {if}
            0 (S.L.tactileo_mode)
        {else}
            l0 10 <
            {if}
                1 (S.L.tactileo_power)
                1 (S.L.tactileo_screen_mode)
                1 (S.L.tactileo_mode)
            {else}
                l0 15 <
                {if}
                    2 (S.L.tactileo_mode)
                {else}
                    l0 20 <
                    {if}
                        3 (S.L.tactileo_mode)
                    {else}
                        l0 25 <
                        {if}
                            4 (S.L.tactileo_mode)
                        {else}
                            l0 25.5 <
                            {if}
                                5 (S.L.tactileo_mode)
                            {endif}
                        {endif}
                    {endif}
                {endif}
            {endif}
        {endif}
'       Système au noir
    {else}
        (L.L.tactileo_power)
        {if}
'       Coupure batterie
            (L.L.tactileo_extinction_delay_timer) (L.S.Timegap) + (S.L.tactileo_extinction_delay_timer) s0 5 >
            l0 8 < &&
            {if}
                3 (S.L.tactileo_mode)
                0 (S.L.tactileo_input_buttons_visible)
            {else}
                (L.L.tactileo_extinction_delay_timer) 10 <
                {if}
                    4 (S.L.tactileo_mode)
                {else}    
                    (L.L.tactileo_extinction_delay_timer) 15 <
                    {if}
                        0 (S.L.tactileo_power) (S.L.tactileo_mode) (S.L.tactileo_Show_Departure) (S.L.tactileo_screen_mode)
                        0 (S.L.tactileo_init_timer) (S.L.tactileo_extinction_delay_timer) (S.L.tactileo_cockpit_visible) (S.L.tactileo_TargetHasNoAnsagen)
                        0 (S.L.tactileo_ligne) (S.L.tactileo_train)
                        "" (S.$.tactileo_ligne_TEXT) (S.$.tactileo_train_TEXT) (S.$.tactileo_wmess) (S.$.tactileo_cockpit_time) (S.$.tactileo_input_data) 
                        "" (S.$.tactileo_input_text) (S.$.tactileo_BUFFER_TEXT_CurrentStop) (S.$.tactileo_BUFFER_TEXT_NextStop) 
                        "" (S.$.tactileo_BUFFER_TEXT_PreviousStop) (S.$.tactileo_BUFFER_TEXT_Recap_RunTarget) (S.$.tactileo_BUFFER_TEXT_TTDelay) (S.$.tactileo_TEXT_stopinfo) 
                        "" (S.$.tactileo_TEXT_stophour) (S.$.tactileo_TEXT_stopname) (S.$.tactileo_TEXT_service) (S.$.tactileo_TEXT_StateOfService) (S.$.tactileo_TEXT_RunTarget) 
                        "" (S.$.tactileo_TEXT_schedule_recap) (S.$.tactileo_delay_TEXT) (S.$.tactileo_LastBusstopKnown)
                        "INEO\0" ".tga" $+ (S.$.tactileo_seq_display)
                    {endif}
                {endif}
            {endif}
        {endif}

    {endif}
{end}

{macro:tactileo_frame}
    1 (S.L.Refresh_Strings)
    (M.L.tactileo_UCE)
    (M.L.tactileo_calc_delay)
    (L.L.tactileo_mode) 0 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        "INEO\0" ".tga" $+ (S.$.tactileo_seq_display)
        0 (S.L.tactileo_cockpit_visible)
        0 (S.L.tactileo_power)
    {endif}
'   Écran d'ouverture "Initialisation v1.0.25"
    (L.L.tactileo_mode) 1 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        "INEO\1" ".tga" $+ (S.$.tactileo_seq_display)
        0 (S.L.tactileo_cockpit_visible) (S.L.tactileo_input_buttons_visible)
        1 (S.L.tactileo_power)
    {endif}
'   Écran de chargement "Démarrage application v1.0.25"
    (L.L.tactileo_mode) 2 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        "INEO\2" ".tga" $+ (S.$.tactileo_seq_display)
        0 (S.L.tactileo_cockpit_visible) (S.L.tactileo_input_buttons_visible)
    {endif}
'   Écran de chargement "UCE Déconnecté"
    (L.L.tactileo_mode) 3 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        "INEO\3" ".tga" $+ (S.$.tactileo_seq_display)
        0 (S.L.tactileo_cockpit_visible) (S.L.tactileo_input_buttons_visible)
    {endif}
'   Écran de chargement "vide"
    (L.L.tactileo_mode) 4 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        "INEO\4" ".tga" $+ (S.$.tactileo_seq_display)
        0 (S.L.tactileo_cockpit_visible) (S.L.tactileo_input_buttons_visible)
    {endif}
'   Écran de prise de service
    (L.L.tactileo_mode) 5 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        "INEO\5" ".tga" $+ (S.$.tactileo_seq_display)
        "Faire la prise de service@du vehicule " (L.$.number) $+ (S.$.tactileo_wmess)
        1 (S.L.tactileo_cockpit_visible)
        0 (S.L.tactileo_input_buttons_visible)
    {endif}

'   SAISIE DU N DE LIGNE - RETOUR AU BOUT DE 30 SEC SI PAS D'ACTIONS 
    (L.L.tactileo_mode) 6 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        1 (S.L.tactileo_input_buttons_visible)
        "INEO\6" ".tga" $+ (S.$.tactileo_seq_display)
        "LIGNE :" (S.$.tactileo_input_data)
        (L.L.tactileo_notouch_delay_timer) (L.S.Timegap) + (S.L.tactileo_notouch_delay_timer) 30 >
        {if}
            5 (S.L.tactileo_mode)
        {endif}
    {endif}

'   SAISIE DU N DE TRAIN - RETOUR AU BOUT DE 30 SEC SI PAS D'ACTIONS 
    (L.L.tactileo_mode) 7 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        1 (S.L.tactileo_input_buttons_visible)
        "INEO\6" ".tga" $+ (S.$.tactileo_seq_display)
        "TRAIN :" (S.$.tactileo_input_data)
        (L.L.tactileo_notouch_delay_timer) (L.S.Timegap) + (S.L.tactileo_notouch_delay_timer) 30 >
        {if}
            5 (S.L.tactileo_mode)
        {endif}
    {endif}

'   VERIFICATION DU SERVICE PRIS ET DES DONNEES ENREGISTREES
'   Si la prise de service est refusée, retour à la prise de service au bout de 10 secondes.
    (L.L.tactileo_mode) 8 =
    {if}
        1 (S.L.tactileo_screen_mode)
        0 (S.L.tactileo_Show_Departure)
        0 (S.L.tactileo_input_buttons_visible)
        "INEO\6_2" ".tga" $+ (S.$.tactileo_seq_display)
        (L.L.schedule_active)
        {if}
            (M.V.GetTTLineString) (S.$.tactileo_TTLineString)
            (L.L.tactileo_timer_input_check) (L.S.Timegap) + (S.L.tactileo_timer_input_check) s0 2 <
            {if}
                "Parametres en attente@de validation." (S.$.tactileo_wmess)
            {else}
                l0 12 <
                {if}
                    (M.V.GetTTBusstopIndex) (S.L.tactileo_FirstStopIndex)
                    "Ligne/Train : " (L.$.tactileo_ligne_TEXT) $+ "/" $+ (L.$.tactileo_train_TEXT) $+ "@Prise de service acceptee." $+ (S.$.tactileo_wmess)
                    (L.L.tactileo_alert_norepeat) !
                    {if}
                        1 (S.L.tactileo_schedule_active)
                        (T.L.ev_tactileo_alert)
                        1 (S.L.tactileo_alert_norepeat)
                    {endif}
                {else}
                    10 (S.L.tactileo_mode)
                    0 (S.L.tactileo_alert_norepeat)
                {endif}
            {endif}
        {else}
            0 (S.L.tactileo_Show_Departure)
            0 (S.L.tactileo_input) (S.L.tactileo_input_count)
            0 (S.L.tactileo_schedule_active)
            (L.L.tactileo_timer_input_check) (L.S.Timegap) + (S.L.tactileo_timer_input_check) s0 2 <
            {if}
                "Parametres en attente@de validation." (S.$.tactileo_wmess)
            {else}
                l0 4 <
                {if}
                    "Ligne/Train : " (L.$.tactileo_ligne_TEXT) $+ "/" $+ (L.$.tactileo_train_TEXT) $+ " invalide. @PRISE SCE REFUSEE" $+ (S.$.tactileo_wmess)
                    (L.L.tactileo_alert_norepeat) !
                    {if}
                        (T.L.ev_tactileo_alert)
                        1 (S.L.tactileo_alert_norepeat)
                    {endif}
                {else}
                    5 (S.L.tactileo_mode)
                    0 (S.L.tactileo_alert_norepeat)
                {endif}
            {endif}
        {endif}
    {endif}

    (L.L.tactileo_mode) 9 =
    {if}
        0 (S.L.tactileo_Show_Departure)
        1 (S.L.tactileo_screen_mode)
        "INEO\5" ".tga" $+ (S.$.tactileo_seq_display)
        "Ligne/Train " (L.$.tactileo_ligne_TEXT) $+ "/" $+ (L.$.tactileo_train_TEXT) $+ "@Prise de service acceptee." $+ (S.$.tactileo_wmess)
    {endif}

    (L.L.tactileo_mode) 10 =
    {if}
        2 (S.L.tactileo_screen_mode)
        (L.$.tactileo_ligne_TEXT) "@" $+ (L.$.tactileo_TEXT_RunTarget) $+ (S.$.tactileo_TEXT_schedule_recap)
'       Départ terminus
        (L.L.tactileo_AtStation) !
        {if}
            0 (S.L.tactileo_Show_Departure)
            (L.L.tactileo_FirstStopIndex) (L.L.tactileo_LastStopOnSchedule) =
            {if}
                "INEO\13" ".tga" $+ (S.$.tactileo_seq_display) (S.$.tactileo_seq_display_2)
                1 (S.L.tactileo_Show_DisplayPrevStop)
                1 (S.L.tactileo_Show_DisplayCurrStop)
                0 (S.L.tactileo_Show_DisplayNextStop)
            {else}
                "INEO\7" ".tga" $+ (S.$.tactileo_seq_display) (S.$.tactileo_seq_display_2)
                1 (S.L.tactileo_Show_DisplayPrevStop)
                1 (S.L.tactileo_Show_DisplayCurrStop)
                1 (S.L.tactileo_Show_DisplayNextStop)
            {endif}
        {else}
            (L.L.tactileo_FirstStopIndex) 0 =
            {if}
                0 (S.L.tactileo_Show_DisplayPrevStop)
                1 (S.L.tactileo_Show_DisplayCurrStop)
                1 (S.L.tactileo_Show_DisplayNextStop)
                (M.V.GetTTDelay) s1 60 / s0
                l1 abs 6 >= (L.L.tactileo_mode) 10 = &&
                {if}
                    l0 -1 <
                    {if}
                        2 (S.L.tactileo_Show_Departure)
                        "INEO\11_2" ".tga" $+ (S.$.tactileo_seq_display) (S.$.tactileo_seq_display_2)
                    {else}
                        l0 -1 >
                        {if}
                            "INEO\11_1" ".tga" $+ (S.$.tactileo_seq_display) (S.$.tactileo_seq_display_2)
                            1 (S.L.tactileo_Show_Departure)
                        {endif}
                    {endif}
                {endif}
            {else}
                0 (S.L.tactileo_Show_Departure)
                (L.L.tactileo_FirstStopIndex) (L.L.tactileo_LastStopOnSchedule) =
                {if}
                    "INEO\14" ".tga" $+ (S.$.tactileo_seq_display) (S.$.tactileo_seq_display_2)
                    1 (S.L.tactileo_Show_DisplayPrevStop)
                    1 (S.L.tactileo_Show_DisplayCurrStop)
                    0 (S.L.tactileo_Show_DisplayNextStop)
                {else}
                    "INEO\8" ".tga" $+ (S.$.tactileo_seq_display) (S.$.tactileo_seq_display_2)
                    1 (S.L.tactileo_Show_DisplayPrevStop)
                    1 (S.L.tactileo_Show_DisplayCurrStop)
                    1 (S.L.tactileo_Show_DisplayNextStop)
                {endif}
            {endif}
        {endif}
        (M.V.GetTTDelay) s1 60 / s0
        l1 abs 6 >= (L.L.tactileo_mode) 10 = &&
            l0 -1 >
            {if}
                "INEO\11_1.tga" (S.$.tactileo_seq_display_3)
                1 (S.L.tactileo_departure_Blinker)
            {else}
                0 (S.L.tactileo_departure_Blinker)
                "INEO\11_2.tga" (S.$.tactileo_seq_display_3)
                "INEO\11_2.tga" (S.$.tactileo_seq_display_4)
            {endif}
    {else}
        0 (S.L.tactileo_Show_Departure)
        0 (S.L.tactileo_Show_DisplayPrevStop) (S.L.tactileo_Show_DisplayCurrStop) (S.L.tactileo_Show_DisplayNextStop)
        "" (S.$.tactileo_TEXT_DisplayPrevStop) (S.$.tactileo_TEXT_DisplayCurrStop) (S.$.tactileo_TEXT_DisplayNextStop)
    {endif}

    (L.L.tactileo_mode) 11 =
    {if}
        1 (S.L.tactileo_screen_mode)
        "INEO\16.tga" (S.$.tactileo_seq_display)        
    {endif}

{end}

{macro:ineo_hoursync}
    (L.S.Time) 3600 / s0 trunc s1 "02" $IntToStrEnh ":" $+
    l0 l1 - 60 * trunc "02" $IntToStrEnh $+ (S.$.tactileo_cockpit_time)
{end}

{macro:tactileo_num_input}
    s0
    (L.L.tactileo_mode) 6 =
    {if}
        (L.L.tactileo_input_count) 4 <
        {if}
            (L.L.tactileo_input) 10 * l0 + (S.L.tactileo_input)
            (L.$.tactileo_input_text) l0 $IntToStr $+ (S.$.tactileo_input_text)
            (L.L.tactileo_input_count) 1 + (S.L.tactileo_input_count)
        {endif}
    {else}
        (L.L.tactileo_mode) 7 =
        {if}
            (L.L.tactileo_input_count) 2 <
            {if}
                (L.L.tactileo_input) 10 * l0 + (S.L.tactileo_input)
                (L.$.tactileo_input_text) l0 $IntToStr $+ (S.$.tactileo_input_text)
                (L.L.tactileo_input_count) 1 + (S.L.tactileo_input_count)
            {endif}
        {endif}
    {endif}
{end}    

{macro:tactileo_strings}
'   Mise en cache des variables d'utilisation courante
    (L.L.schedule_active)
    {if}
        "Arret suivant" (S.$.tactileo_TEXT_stopinfo)
        (M.V.GetTTBusstopCount) 1 - (M.L.GetTTBusstopName)  (S.$.tactileo_BUFFER_TEXT_Recap_RunTarget)
        (M.V.GetTTBusstopIndex) 2 + (M.L.GetTTBusstopName)  (S.$.tactileo_BUFFER_TEXT_NextStop)
        (M.V.GetTTBusstopIndex) -1 (M.L.GetTTBusstopName)  (S.$.tactileo_BUFFER_TEXT_PreviousStop)
        (M.V.GetTTBusstopIndex) 1 + (M.L.GetTTBusstopName)  (S.$.tactileo_BUFFER_TEXT_CurrentStop)
        (M.L.tactileo_calc_delay) (S.$.tactileo_BUFFER_TEXT_TTDelay)
    {endif}

'   Obtenir la destination
    (L.L.tactileo_Mode) 10 =
    {if}
        (L.L.schedule_active)
        {if}
            (L.$.tactileo_BUFFER_TEXT_Recap_RunTarget) (S.$.tactileo_TEXT_RunTarget)
            (L.L.door_0) (L.L.tactileo_Announcement_AntiRepeat_off) ! &&
            {if}
                (M.L.tactileo_PlayDoorAnnouncement)
                1 (S.L.tactileo_Announcement_AntiRepeat_off)                          
            {endif}
        {else}
            0 (S.L.tactileo_Announcement_AntiRepeat_off)
            0 (S.L.tactileo_Show_DisplayCurrStop) (S.L.tactileo_Show_DisplayPrevStop) (S.L.tactileo_Show_DisplayNextStop)
            5 (S.L.tactileo_mode)
        {endif}
    {endif}

    (L.L.AI) !
    {if}
        (L.L.door_0) 0.9 > (L.L.door_1) 0.9 > ||
        (C.L.tactileo_DoorAnnouncement_DoorBack) (L.L.door_2) 0.9 > (L.L.door_3) 0.9 > || (L.L.door_4) 0.9 > || (L.L.door_5) 0.9 > || (L.L.door_6) 0.9 > || (L.L.door_7) 0.9 > || && ||
        {if}
            (L.L.tactileo_DoorAnnouncement_Blocked) !
            (L.L.tactileo_DoorAnnouncement_Played) ! &&
            {if}
                (M.L.tactileo_PlayDoorAnnouncement)
                1 (S.L.tactileo_DoorAnnouncement_Blocked)
                (S.L.tactileo_DoorAnnouncement_Played)
            {endif}
            {else}
                0 (S.L.tactileo_DoorAnnouncement_Played)
            {endif}
        {endif}
        (L.L.tactileo_DoorAnnouncement_Blocked)
        {if}
            (L.L.tactileo_DoorAnnouncement_Blocked_timer) (L.S.Timegap) + (C.L.tactileo_DoorAnnouncement_Block_time_insec) min (S.L.tactileo_DoorAnnouncement_Blocked_timer) (C.L.tactileo_DoorAnnouncement_Block_time_insec) =
            {if}
                0 (S.L.tactileo_DoorAnnouncement_Blocked) (S.L.tactileo_DoorAnnouncement_Blocked_timer)
            {endif}
        {endif}        
    {endif}
{end}

{macro:tactileo_calc_delay}
    (L.L.schedule_active)
    {if}
        (M.V.GetTTDelay) s1 60 / s0
        l1 abs 6 >=
        {if}
            l0 -1 >
            {if}
                l0 abs trunc "02" $IntToStrEnh
                (S.$.tactileo_delay_TEXT)
                1 (S.L.tactileo_delay)
            {else}
                l0 -1 <
                {if}
                    l0 abs trunc "02" $IntToStrEnh
                    (S.$.tactileo_delay_TEXT)
                    2 (S.L.tactileo_delay)
                {endif}
            {endif}
        {endif}
    {else}
        "" (S.$.tactileo_delay_TEXT)
        0 (S.L.tactileo_delay)
    {endif}
{end}

{macro:tactileo_UCE}
'   Détermine si le bus est à l'approche de l'arrêt.
    (L.$.tactileo_LastBusstopKnown) (M.V.GetTTBusstopIndex) $IntToStr (M.V.GetTTBusstopName) $+ $= !
    {if}
        (M.V.GetTTBusstopIndex) (M.V.GetTTBusstopArr) s0 l0 86399 > 86400 * - (M.V.GetTTDelay) + (L.S.Time) - 15 < &&
        {if} 
            (L.L.tactileo_Announcement_AntiRepeat_off) !
            {if}
                (M.L.tactileo_PlayAnnouncement)
                1 (S.L.tactileo_Announcement_AntiRepeat_off)
            {endif}
            (M.V.GetTTBusstopIndex) $IntToStr (M.V.GetTTBusstopName) $+ (S.$.tactileo_LastBusstopKnown) 
            1 (S.L.tactileo_AtStation)
        {else} 
            0 (S.L.tactileo_AtStation) (S.L.tactileo_Announcement_AntiRepeat_off)
        {endif} 
    {endif}

'   Mise à jour des informations GPS
    (M.V.GetTTLineString) (M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+ (L.$.tactileo_LastTargetKnown) $= !
    (L.L.tactileo_schedule_active) &&
    {if}
        (L.L.schedule_active)
        {if}
            (L.$.tactileo_TTLineString) (S.$.Matrix_Nr) (S.$.Matrix_Liniennummerstring)
            (M.V.GetTTTerminusIndex) (S.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) (S.L.IBIS_TerminusCode)
            -1 (S.L.Matrix_TerminusIndex_Last) (M.L.tactileo_RefreshTerminusText)
        {endif}
        (M.V.GetTTLineString) (M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+ (S.$.tactileo_LastTargetKnown)
    {endif}
    
    (L.L.tactileo_schedule_active) (L.L.schedule_active) &&
    {if}
        (M.V.GetTTBusstopIndex) (S.L.tactileo_FirstStopIndex)        
    {endif}

'   Obtention des horaires et du nom de l'arrêt en cours
    (L.L.schedule_active) 
    {if}
        (M.V.GetTTBusstopCount) 1 - (S.L.tactileo_LastStopOnSchedule)
        (M.V.GetTTBusstopCount) 2 - (S.L.tactileo_LastStopOnSchedule_Approaching)
        (L.L.tactileo_FirstStopIndex) (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh ":" $+
        l0 l1 - 60 * trunc "02" $IntToStrEnh $+ (S.$.tactileo_TEXT_stophour)
        (L.L.tactileo_FirstStopIndex) (M.V.GetTTBusstopName) (S.$.tactileo_TEXT_stopname) (S.$.tactileo_TEXT_DisplayCurrStop)
        (L.L.tactileo_FirstStopIndex) 1 < 
        {if}
            (L.L.tactileo_FirstStopIndex) 2 + (M.V.GetTTBusstopName) (S.$.tactileo_TEXT_DisplayNextStop)
        {else} 
            (L.L.tactileo_FirstStopIndex) (L.L.tactileo_LastStopOnSchedule_Approaching) =
            {if}
                (L.$.tactileo_TEXT_RunTarget) (S.$.tactileo_TEXT_DisplayNextStop)
            {else}
                
            {endif}
            (L.L.tactileo_FirstStopIndex) 1 + (M.V.GetTTBusstopName) (S.$.tactileo_TEXT_DisplayNextStop)
        {endif}
        (L.L.tactileo_FirstStopIndex) 1 - (M.V.GetTTBusstopName) (S.$.tactileo_TEXT_DisplayPrevStop)
        (L.$.tactileo_ligne_TEXT) (L.$.tactileo_train_TEXT) $+ (S.$.tactileo_TEXT_service)
        (L.L.tactileo_FirstStopIndex) 1 <
        {if}
            "T.DEPART" (S.$.tactileo_TEXT_StateOfService)
        {else}
            (L.L.tactileo_FirstStopIndex) (L.L.tactileo_LastStopOnSchedule) =
            {if}
                "HLP@INTER-CRS" (S.$.tactileo_TEXT_StateOfService)
            {else}
                "EN LIGNE" (S.$.tactileo_TEXT_StateOfService)
            {endif}
        {endif}
    {endif}
{end}

{macro:tactileo_RefreshTerminusText}
    (L.L.IBIS_TerminusIndex) 0 (M.V.GetTerminusString) (S.$.IBIS_terminus_name)
  {end}

{macro:tactileo_delay_scale}
    (L.L.tactileo_mode) 10 =
    {if} 
        (L.L.tactileo_AtStation) 1 = (L.L.tactileo_FirstStopIndex) 0 = && l0 -1 < &&
        {if}
            "INEO\11_2.tga" (S.$.tactileo_seq_display_4)
        {else}
            (L.L.tactileo_AtStation) 1 = (L.L.tactileo_FirstStopIndex) 0 = && l0 -1 > &&
            {if}
                "INEO\11_1.tga" (S.$.tactileo_seq_display_4)
            {else}
                (L.L.schedule_active)
                {if}
                    (M.V.GetTTDelay) s1 60 / s0 trunc (S.L.tactileo_TimeBeforeDeparture)
                    l1 abs 6 >=
                    {if}
                        l0 -1 <
                        {if}
                            (L.L.tactileo_TimeBeforeDeparture) -18 <
                            {if}
                                "INEO\delay\AV18.tga" (S.$.tactileo_seq_display_4)
                            {else}
                                "INEO\delay\AV" (L.$.tactileo_delay_text) $+ ".tga" $+ (S.$.tactileo_seq_display_4)
                            {endif}
                        {else}
                            (L.L.tactileo_TimeBeforeDeparture) 19 >
                            {if}
                                "INEO\delay\RT19.tga" (S.$.tactileo_seq_display_4)
                            {else}
                                "INEO\delay\RT" (L.$.tactileo_delay_text) $+ ".tga" $+ (S.$.tactileo_seq_display_4)
                            {endif}
                        {endif}
                    {endif}
                {endif}   
            {endif}
        {endif}
    {endif}
{end}

{macro:tactileo_departure_BlinkerFunction}
    (L.L.tactileo_departure_Blinker) 1 =
    {if}
        (L.L.tactileo_AtStation) (L.L.tactileo_FirstStopIndex) 0 = &&
        {if}
            (L.L.tactileo_departure_BlinkTimer) (L.S.Timegap) + (S.L.tactileo_departure_BlinkTimer) s0 1 <
            {if}
                "INEO\11_1.tga" (S.$.tactileo_seq_display_4)
            {else}
                l0 2 <
                {if}
                    "INEO\11_3.tga" (S.$.tactileo_seq_display_4)
                {else}
                    0 (S.L.tactileo_departure_BlinkTimer)
                {endif}
            {endif}
        {endif}
    {endif}
{end}

{macro:tactileo_PlayAnnouncement}
'	(L.L.tactileo_FirstStopIndex) 0 >
'	{if}

'		"..\..\Announcements\" 0 (M.V.GetDepotStringGlobal) "\" $+ $+ (L.$.tactileo_TEXT_DisplayCurrStop) $+ $msg

'		(L.L.IBIS_RouteIndex) (M.V.GetBusstopCount) 1 - (L.L.tactileo_FirstStopIndex) <=
'		{if}
'			"_#terminus" $+
'		{endif}

'		".wav" $+
'		(T.F.ev_IBIS_Ansagen)
'	{endif}

    (L.L.tactileo_TargetHasNoAnsagen) !
    {if}
        "..\..\Announcements\"
        0 (M.V.GetDepotStringGlobal) $+
        "\" $+ s0 $length s5
        (M.V.GetTTBusstopIndex) 0 >
        {if}
            0 (M.V.GetDepotStringGlobal) "Express 91.06" $=
            0 (M.V.GetDepotStringGlobal) "Grand Paris-Moulon" $= ||
            {if}
                (M.V.GetTTBusstopCount) 1 - (M.V.GetTTBusstopIndex) = !
                {if}
                    (M.V.GetTTTerminusIndex) 1 (M.V.GetTerminusString) 11 $SetLengthL "LIGNE 91.06" $=
                    {if}
                        l0 (M.V.GetTTTerminusIndex) 1 (M.V.GetTerminusString) $RemoveSpaces 3 $SetLengthR $+ s0
                    {else}
                        l0 (M.V.GetTTLineString) $+ s0
                    {endif}
                    0 (M.V.GetDepotStringGlobal) "Express 91.06" $= (M.V.GetTTLineString) "11" $= ! &&
                    0 (M.V.GetDepotStringGlobal) "Grand Paris-Moulon" $= (L.$.Yard) "Grand Paris-Moulon Keolis" $= ! (L.$.Yard) "Grand Paris-Moulon GPM" $= ! && && ||
                    {if}
                        l0 (M.V.GetTTTerminusIndex) (M.L.GetTTTerminusPrefix) $+ s0
                    {else}
                        l0 "_" $+ s0
                    {endif}
                    l0 "A_" $+ (M.V.GetTTBusstopIndex) (M.L.GetTTBusstopName) $+ s0
                {else}
                    (M.V.GetTTTerminusIndex) 1 (M.V.GetTerminusString) 11 $SetLengthL "LIGNE 91.06" $=
                    {if}
                        l0 "06" $+ s0
                    {else}
                        l0 (M.V.GetTTLineString) $+ s0
                    {endif}
                    (L.$.Yard) "Grand Paris-Moulon Keolis" $= {if} l0 "_Term" $+ s0 {endif}
                    l0 "_A_" $+ (M.V.GetTTBusstopIndex) (M.L.GetTTBusstopName) $+ "_#terminus" $+ s0
                {endif}
            {else}
                0 (M.V.GetDepotStringGlobal) "HamburgTagUndNacht" $=
                0 (M.V.GetDepotStringGlobal) "HamburgHafenCity"   $= ||
                0 (M.V.GetDepotStringGlobal) "Gladbeck"           $= ||
                0 (M.V.GetDepotStringGlobal) "Ruhrgebiet"         $= ||
                {if}
                    l0 (M.V.GetTTLineString) "_" $+ $+
                    (M.V.GetTTBusstopIndex) (M.L.GetTTBusstopName) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) $+ s0
                    (M.V.GetTTBusstopCount) 1 - (M.V.GetTTBusstopIndex) =
                    {if}
                        l0 "_#terminus" $+ s0
                    {endif}
                {else}
                    0 (M.V.GetDepotStringGlobal) "Horizon16" $=
                    {if}
                        (M.V.GetTTBusstopCount) 1 - (M.V.GetTTBusstopIndex) = !
                        {if}
                            l0 (M.V.GetTTLineString) $+ "_" $+
                            (M.V.GetTTTerminusIndex) (M.L.GetTTTerminusPrefix) $+ "_" $+
                            (M.V.GetTTBusstopIndex) (M.L.GetTTBusstopName) $+ s0
                        {else}
                            l0 (M.V.GetTTBusstopIndex) (M.V.GetTTBusstopName) $+
                            "_#terminus" $+ s0
                        {endif}

                    {else}
                        0 (M.V.GetDepotStringGlobal) "DBC_Chicago" $=
                        {if}
                            l0 (M.V.GetTTLineString) "_" $+ $+ s0
                        {endif}
                        l0 (M.V.GetTTBusstopIndex) (M.L.GetTTBusstopName) $+ s0
                        (M.V.GetTTBusstopCount) 1 - (M.V.GetTTBusstopIndex) =
                        {if}
                            l0 "_#terminus" $+ s0
                        {endif}

                    {endif}
                {endif}
            {endif}

        {else}
            0 (M.V.GetDepotStringGlobal) "Express 91.06" $=
            0 (M.V.GetDepotStringGlobal) "Grand Paris-Moulon" $= ||
            {if}
                (M.V.GetTTTerminusIndex) 1 (M.V.GetTerminusString) 11 $SetLengthL "LIGNE 91.06" $=
                {if}
                    l0 (M.V.GetTTTerminusIndex) 1 (M.V.GetTerminusString) $RemoveSpaces 3 $SetLengthR $+ s0
                {else}
                    l0 (M.V.GetTTLineString) $+ s0
                {endif}
                l0 (M.V.GetTTTerminusIndex) (M.L.GetTTTerminusPrefix) $+ s0
                0 (M.V.GetDepotStringGlobal) "Express 91.06" $=
                {if}
                    l0 "Dep_" $+ s0
                {else}
                    l0 "Dep_vers_" $+ s0
                {endif}
                l0 0 (M.L.GetTTBusstopName) $+ s0
            {else}
                0 (M.V.GetDepotStringGlobal) "Horizon16" $=
                {if}
                    l0 (M.V.GetTTLineString) $+ "_" $+
                    (M.V.GetTTTerminusIndex) (M.L.GetTTTerminusPrefix) $+ "_" $+
                    (M.V.GetTTBusstopIndex) (M.L.GetTTBusstopName) $+ s0
                {else}
                    0 (M.V.GetDepotStringGlobal) "St-Servan" $=
                    {if}
                        l0 (L.$.tactileo_TTLineString) $+ "_" $+
                        (M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+
                        "_#target" $+ s0

                    {endif}
                {endif}
            {endif}
        {endif}
        l0 ".wav" $+ $length l5 + l5 - 4 >
        {if}
            (T.F.ev_IBIS_Ansagen)
        {endif}
    {endif}

{end}

{macro:tactileo_PlayDoorAnnouncement}
    (L.L.tactileo_TargetHasNoAnsagen) !
    {if}
        "..\..\Announcements\"
        0 (M.V.GetDepotStringGlobal) $+
        "\" $+ s0 $length s5
        0 (M.V.GetDepotStringGlobal) "Horizon16" $=
        {if}
            l0 (M.V.GetTTLineString) $+ "_" $+
            (M.V.GetTTTerminusIndex) (M.L.GetTTTerminusPrefix) $+ "_" $+ s0
            (M.V.GetTTBusstopIndex) (M.L.GetTTBusstopName) (L.$.tactileo_LastBusstopArrAnnouncementPlayed) $= !
            {if} (M.V.GetTTBusstopIndex) 1 - {else} (M.V.GetTTBusstopIndex) {endif} s1
            l0 l1 $+ (M.L.GetTTBusstopName) $+ s0
        {else}
            0 (M.V.GetDepotStringGlobal) "St-Servan" $=
            {if}
                l0 (L.$.tactileo_TTLineString) $+ "_" $+
                (M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+
                "_#target" $+ s0 (S.$.tactileo_AnnounceDir)
            {else}
                l0 (M.V.GetTTLineString) $+ s0
                0 (M.V.GetDepotStringGlobal) "DBC_Chicago" $=
                {if}
                    l0 "_EXT_" $+ s0
                {else}
                    l0 "_" $+ s0
                {endif}
                l0 (M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+ s0
                0 (M.V.GetDepotStringGlobal) "DBC_Chicago" $= !
                {if}
                    l0 "_#ext" $+ s0
                {endif}
            {endif}
        {endif} 
        l0 ".wav" $+ $length l5 + l5 - 4 >
        {if}
            (T.F.ev_IBIS_Ansagen)
        {endif}
    {endif}
  
{end}

{macro:GetTTBusstopName} s0
    (M.V.GetTTBusstopName) s1
    (S.$.tactileo_tmpstr1)
 
'   GPM
    0 (M.V.GetDepotStringGlobal) "Express 91.06" $= 0 (M.V.GetDepotStringGlobal) "Grand Paris-Moulon" $= || {if}
    (L.$.tactileo_tmpstr1) "MASSY Gare - Terminus" $= {if} "" "MASSY Gare" s1 {endif}
    (L.$.tactileo_tmpstr1) "Cormeilles Gare - Terminus" $= {if} "" "Cormeilles Gare" s1 {endif}
    (L.$.tactileo_tmpstr1) 7 $SetLengthR "quai C3" $= {if} "" "Cormeilles Gare" s1 {endif}
    (L.$.tactileo_tmpstr1) "PAUSE PM3" $= {if} "" "Plateau du Moulon" s1 {endif}
    (L.$.tactileo_tmpstr1) 5 $SetLengthL "PMSud" $= {if} "" "PMSud Thalès" s1 {endif}
    (L.$.tactileo_tmpstr1) 5 $SetLengthL "ENSTA" $= {if} "" "ENSTA Moulon Sud" s1 {endif}
    (L.$.tactileo_tmpstr1) "Place 1802" $= {if} "" "Depot Transdev" s1 {endif}
    (L.$.tactileo_tmpstr1) 6 $SetLengthL "Keolis" $= {if} "" "Depot Keolis" s1 {endif}
    (L.$.tactileo_tmpstr1) 8 $SetLengthL "Quartier" $= {if} "" "Vauhallan Quartier résidentiel" s1 {endif}
    {endif}
 
' Horizon16
    0 (M.V.GetDepotStringGlobal) "Horizon16" $= {if}
    (L.$.tactileo_tmpstr1) "1 Voltaire" $= {if} "" "Voltaire" s1 {endif}
    (L.$.tactileo_tmpstr1) "1 Cap Sud" $= {if} "" "Cap Sud" s1 {endif}
    (L.$.tactileo_tmpstr1) "1 Voltaire SP" $= {if} "" "Voltaire SP" s1 {endif}
    (L.$.tactileo_tmpstr1) "1 Beaulieu SP" $= {if} "" "Beaulieu SP" s1 {endif}
    (L.$.tactileo_tmpstr1) "2 Voltaire" $= {if} "" "Voltaire" s1 {endif}
    (L.$.tactileo_tmpstr1) "2 Saint Maur" $= {if} "" "Saint Maur" s1 {endif}
    (L.$.tactileo_tmpstr1) "2 Voltaire SP" $= {if} "" "Voltaire SP" s1 {endif}
    (L.$.tactileo_tmpstr1) "2 Pointerie SP" $= {if} "" "Pointerie SP" s1 {endif}
    (L.$.tactileo_tmpstr1) "8 La loge" $= {if} "" "La loge" s1 {endif}
    (L.$.tactileo_tmpstr1) "8 Notz" $= {if} "" "Notz" s1 {endif}
    (L.$.tactileo_tmpstr1) "8 Saint Maur" $= {if} "" "Saint Maur" s1 {endif}
    (L.$.tactileo_tmpstr1) "8a La Loge" $= {if} "" "La Loge" s1 {endif}
    (L.$.tactileo_tmpstr1) "8a St Christophe" $= {if} "" "St Christophe" s1 {endif}
    (L.$.tactileo_tmpstr1) "8b La Loge" $= {if} "" "La Loge" s1 {endif}
    (L.$.tactileo_tmpstr1) "8b St Pierre" $= {if} "" "St Pierre" s1 {endif}
    (L.$.tactileo_tmpstr1) "9 La Loge" $= {if} "" "La Loge" s1 {endif}
    (L.$.tactileo_tmpstr1) "9 Provence" $= {if} "" "Provence" s1 {endif}
    (L.$.tactileo_tmpstr1) "B Pointerie" $= {if} "" "Pointerie" s1 {endif}
    (L.$.tactileo_tmpstr1) "B St Christophe" $= {if} "" "St Christophe" s1 {endif}
    (L.$.tactileo_tmpstr1) "CSL MACH36" $= {if} "" "MACH36" s1 {endif}
    (L.$.tactileo_tmpstr1) "CSL Etang de Von" $= {if} "" "Etang de Von" s1 {endif}
    (L.$.tactileo_tmpstr1) "F3 Voltaire" $= {if} "" "Voltaire" s1 {endif}
    (L.$.tactileo_tmpstr1) "S4 Ecole Les Planches" $= {if} "" "Ecole Les Planches" s1 {endif}
    (L.$.tactileo_tmpstr1) "S4 Place de Blois" $= {if} "" "Place de Blois" s1 {endif}
    {endif}
 
 l1
 {end}

 {macro:GetTTTerminusPrefix}
    s0 (M.V.GetTerminusCode) s1
  
' Express 91.06  / Grand Paris-Moulon
    0 (M.V.GetDepotStringGlobal) "Express 91.06" $=
    (L.$.Yard) "Grand Paris-Moulon" $= ||
    {if}
      l1 111 =
      {if}
        "_BG_"
      {else}
        l1 62 = l1 64 = ||
        {if}
          "_CG_"
        {else}
          l1 113 =
          {if}
            "_JM_"
          {else}
            l1 61 = l1 63 = || l1 65 = || l1 67 = ||
            {if}
              "_MG_"
            {else}
              l1 66 = l1 68 = ||
              {if}
                "_PM_"
              {else}
                l1 112 =
                {if}
                  "_QR_"
                {else}
                  ""
                {endif}
              {endif}
            {endif}
          {endif}
        {endif}
      {endif}
  
    {else}
  
' Horizon16
    0 (M.V.GetDepotStringGlobal) "Horizon16" $=
    {if}
  
      l0 0 (M.V.GetTerminusString) 1 $SetLengthL
  
    {else}
  
' St-Servan
    0 (M.V.GetDepotStringGlobal) "St-Servan" $=
    {if}
  
      l1 "03" $IntToStr 1 $cutEnd "20" $=
      l1 "03" $IntToStr 1 $cutEnd "23" $= ||
      {if}
        l1 "03" $IntToStr 1 $cutEnd
      {else}
        (M.V.GetTTLineString)
      {endif}
  
    {else}
      ""
    {endif}
    {endif}
    {endif}
  
{end}

{trigger:HanoverPass_OnOff}
	(L.L.elec_busbar_main)
	{if}
		(L.L.HanoverPass_power) ! (S.L.HanoverPass_power)
	{endif}
{end}

 {macro:HanoverPass_frame}
'   Programmation des messages
'   (L.L.elec_busbar_main) vérifie l'état de la batterie
'   (L.L.HanoverPass_power) vérifie si l'afficheur est alimenté
'   Le script exécuté vérifiera que lorsque la batterie est éteinte, et que l'afficheur est éteint, l'afficheur restera au noir.
	(L.L.elec_busbar_main) (L.L.HanoverPass_power) && !
	{if}
	     0 (S.L.HanoverPass_StatusDisplaying) (S.L.HanoverPass_SlidingText) (S.L.HanoverPass_SlidingText_2)
		 "" (S.$.tactileo_PassengerDisplay)
     0 (S.L.1410E2N1_Display_Default)
	{else}
        (L.L.tactileo_init_timer) 0.1 >= (L.L.tactileo_init_timer) 10 < &&
        {if}
            0 (S.L.1410E2N1_Display_Default)
            "Test afficheur intérieur : LUMIXOL by MAXOL." (S.$.tactileo_PassengerDisplay)
        {else}
		    (L.L.tactileo_schedule_active) !
		    {if}
			    "Bienvenue sur le reseau TAN                    Il est " (L.$.tactileo_cockpit_time) $+ (S.$.tactileo_PassengerDisplay)
		    {else}
                0 (S.L.1410E2N1_Display_Default)
			    (L.L.tactileo_AtStation) !
			    {if}
                    0 (S.L.tactileo_SIV3_visible)
                    (L.L.tactileo_FirstStopIndex) (L.L.tactileo_LastStopOnSchedule) =  (L.L.tactileo_AtStation) ! &&
                    {if}
                        "Prochain arret : " (L.$.tactileo_TEXT_DisplayCurrStop) $+ " Terminus." $+ (S.$.tactileo_PassengerDisplay)
                    {else}
				        "Prochain arret : " (L.$.tactileo_TEXT_DisplayCurrStop) $+ (S.$.tactileo_PassengerDisplay)
                    {endif}
			    {else}
                    (L.L.tactileo_FirstStopIndex) (L.L.tactileo_LastStopOnSchedule) =
                    {if}
                        (L.$.tactileo_TEXT_DisplayCurrStop) $+ " " $+ s0
                        "Terminus." s1
                        s0 s1 $+ (S.$.tactileo_PassengerDisplay)
                    {else}
                        "Ligne " (L.$.tactileo_ligne_TEXT) $+ " " $+ s0
                        "Vers " (L.$.tactileo_TEXT_RunTarget) $+ s1
                        s0 s1 $+ (S.$.tactileo_PassengerDisplay)
' AFFICHAGE DE L'ARRET EN CLIGNOTEMENT                        
                        (L.L.tactileo_PassDisp_TimerShow) (L.S.Timegap) + (S.L.tactileo_PassDisp_TimerShow) s0
                        l0 15 <
                        {if}
                            0 (S.L.tactileo_SIV3_visible)
                        {else}
                            l0 15.5 <
                            {if}
                                1 (S.L.tactileo_SIV3_visible)
                            {else}
                                l0 16 <
                                {if}
                                    2 (S.L.tactileo_SIV3_visible)
                                {else}
                                    l0 16.5 <
                                    {if}
                                        1 (S.L.tactileo_SIV3_visible)
                                    {else}
                                        l0 17 <
                                        {if}
                                            2 (S.L.tactileo_SIV3_visible)
                                        {else}
                                            l0 17.5 <
                                            {if}
                                                1 (S.L.tactileo_SIV3_visible)
                                            {else}
                                                l0 18 <
                                                {if}
                                                    2 (S.L.tactileo_SIV3_visible)
                                                {else}
                                                    l0 18.5 <
                                                    {if}
                                                        1 (S.L.tactileo_SIV3_visible)
                                                    {else}
                                                        l0 19 <
                                                        {if}
                                                            2 (S.L.tactileo_SIV3_visible)
                                                        {else}
                                                            l0 19.5 <
                                                            {if}
                                                                1 (S.L.tactileo_SIV3_visible)
                                                            {else}
                                                                l0 20 <
                                                                {if}
                                                                    2 (S.L.tactileo_SIV3_visible)
                                                                {else}
                                                                    l0 20.5 <
                                                                    {if}
                                                                        1 (S.L.tactileo_SIV3_visible)
                                                                    {else}
                                                                        l0 21 <
                                                                        {if}
                                                                            2 (S.L.tactileo_SIV3_visible)
                                                                        {else}
                                                                            l0 21.5 <
                                                                            {if}
                                                                                1 (S.L.tactileo_SIV3_visible)
                                                                            {else}
                                                                                0 (S.L.tactileo_PassDisp_TimerShow) (S.L.tactileo_SIV3_visible)
                                                                            {endif}
                                                                        {endif}
                                                                    {endif}
                                                                {endif}
                                                            {endif}
                                                        {endif}
                                                    {endif}
                                                {endif}
                                            {endif}
                                        {endif}
                                    {endif}
                                {endif}
                            {endif}
                        {endif}
                    {endif}
'------------------------------------------                    
			    {endif}
            {endif}
		{endif}
	{endif}
'   Programmation du défilement du texte
	(L.L.HanoverPass_SlidingText) (L.S.Timegap) (C.L.HanoverPass_SlidingText_Veloc) * + (S.L.HanoverPass_SlidingText)
	(L.L.HanoverPass_SlidingText_2) (L.S.Timegap) (C.L.HanoverPass_SlidingText_Veloc) * - 0 min (S.L.HanoverPass_SlidingText_2)
	(L.L.HanoverPass_SyncTimer) 2 <
	{if}					
		(L.S.Timegap) (L.L.HanoverPass_SyncTimer) + (S.L.HanoverPass_SyncTimer)	
	{else}
		0 (S.L.HanoverPass_SyncTimer) 
		(C.L.HanoverPass_SlidingText_Max_Rear) (S.L.HanoverPass_SlidingText_2)

		(L.L.HanoverPass_StatusDisplaying) 0 =
		{if}
			1 (S.L.HanoverPass_StatusDisplaying)
		{else}
			(L.L.HanoverPass_StatusDisplaying) 1 =
		    {if}
				2 (S.L.HanoverPass_StatusDisplaying)	
		    {else}
			    (L.L.HanoverPass_StatusDisplaying) 2 =
		        {if}
				    3 (S.L.HanoverPass_StatusDisplaying)	
		        {else}
			        (L.L.HanoverPass_StatusDisplaying) 3 =
			        {if}
				        (L.L.HanoverPass_HideString) 1 =
				        {if}
					        2 (S.L.HanoverPass_StatusDisplaying)
				        {else}
					        1 (S.L.HanoverPass_StatusDisplaying)
				        {endif}
			        {endif}
		        {endif}
		    {endif}
		{endif}
	{endif}			
{end}