
'-------------------------------------------
' Кнопка главного меню
'-------------------------------------------

{trigger:kn_navigator_menu}
	(L.L.elec_busbar_main) 
	{if}
		(T.L.ev_IBIS_piep)
	{endif}
	
	(L.L.navigator_menu) !
	{if}
		1 (S.L.navigator_menu) s1		
		0 (S.L.informator_menu) (S.L.autoinform_menu) (S.L.salon_menu) (S.L.menu_select) (S.L.informator_menu_visible)		
	{else}
		0 (S.L.navigator_menu) s1
	{endif}
{end}


'-------------------------------------------
' Кнопка меню автоинформатора
'-------------------------------------------

{trigger:kn_autoinform_menu}
	(L.L.elec_busbar_main) 
	{if}
		(T.L.ev_IBIS_piep)
	{endif}

	(L.L.elec_busbar_main) 	
	(L.L.autoinform_menu) ! &&
	{if}
		1 (S.L.autoinform_menu) s1	
		0 (S.L.navigator_menu) (S.L.informator_menu) (S.L.salon_menu) (S.L.informator_menu_visible) (S.L.menu_select)
	{else}
		0 (S.L.autoinform_menu) s1			
	{endif}
{end}


'-------------------------------------------
' Кнопка меню информатора
'-------------------------------------------

{trigger:kn_informator_menu}
	(L.L.elec_busbar_main) 
	{if}
		(T.L.ev_IBIS_piep)
	{endif}

	(L.L.elec_busbar_main) 	
	(L.L.informator_menu) ! &&
	{if}
		1 (S.L.informator_menu) s1			
		0 (S.L.navigator_menu) (S.L.autoinform_menu) (S.L.salon_menu) (S.L.menu_select)	
	{else}
		0 (S.L.informator_menu) s1	
		0 (S.L.informator_menu_visible) (S.L.menu_select)
	{endif}
{end}


'-------------------------------------------
' Кнопка меню салона
'-------------------------------------------

{trigger:kn_salon_menu}
	(L.L.elec_busbar_main) 
	{if}
		(T.L.ev_IBIS_piep)
	{endif}

	(L.L.elec_busbar_main) 	
	(L.L.salon_menu) ! &&
	{if}
		1 (S.L.salon_menu) s1
		1 (S.L.menu_select)			
		0 (S.L.navigator_menu) (S.L.autoinform_menu) (S.L.informator_menu) (S.L.salon_menu1_visible) (S.L.informator_menu_visible)		
	{else}
		0 (S.L.salon_menu) s1
		0 (S.L.menu_select)			
	{endif}
	{endif}	
{end}


'-------------------------------------------
' Кнопка меню вниз
'-------------------------------------------

{trigger:kn_down_menu}
	(L.L.elec_busbar_main) 
	{if}
		(T.L.ev_IBIS_piep)
	{endif}
	
	(L.L.menu_select) 	
	(L.L.menu_select_vis) 1 < &&
	{if}
		(L.L.menu_select_vis) 1 + (S.L.menu_select_vis)
	{endif}
{end}


'-------------------------------------------
' Кнопка меню вверх
'-------------------------------------------

{trigger:kn_up_menu}
	(L.L.elec_busbar_main) 
	{if}
		(T.L.ev_IBIS_piep)
	{endif}

	(L.L.menu_select) 	
	(L.L.menu_select_vis) 0 > &&
	{if}
		(L.L.menu_select_vis) 1 - (S.L.menu_select_vis)
	{endif}
{end}

'----------------------------------------
' МАКРОСЫ
'----------------------------------------

{macro:informator_init}
	0 (S.L.informator_menu) (S.L.autoinform_menu) (S.L.salon_menu) (S.L.menu_select) (S.L.navigator_menu)
	
{end}


'----------------------------------------
' Режимы работы информатора ОБЫЧНЫЙ
'----------------------------------------

{macro:informator_frame}

	(M.L.navigator_mode)

{end}
	
	
{macro:navigator_mode}

	(L.L.autoinform_menu)
	{if}
		(M.V.GetTTDelay) s1 60 / s0

		"АВТОИНФОРМАТОР" "@" $+
		" " $+ "@" $+	
		
		"Остановка:                                  " $+ "@" $+
		"     " $+ (L.$.IBIS_busstop_name) 20 $SetLengthL $+ "@" $+
		"Сле$. остановка:                          " $+ "@" $+
		"     " $+ (L.$.IBIS_busstop_name_next) 20 $SetLengthL $+ "@" $+
		" " $+ "@" $+
		
		(L.L.autoinform_menu)
		{if}
			l1 abs 6 >=
			{if}
				l0 0 >=
				{if}
					"ОТСТАВАНИЕ: " $+
				{else}
					"ОПЕРЕЖЕНИЕ: " $+
				{endif}
			{else}
				" " $+
			{endif}
			l0 abs trunc " 2" $IntToStrEnh $+  
			"." $+ 
			l0 abs l0 abs trunc - 10 * " 1"  $IntToStrEnh $+ 
			" мин.          " $+
		{else}
			" " $+
		{endif}
		
		(S.$.autoinform_menu)
	{endif}
	
	
	(L.L.salon_menu)	
	{if}		
		1 (S.L.salon_menu_visible)
		
		"САЛОН" "@" $+
		" " $+ "@" $+		

		(L.L.menu_select_vis) 0 =
		{if}
			"» " $+
		{else}
			"  " $+
		{endif}		
		"Связ? с салоном                         "  $+ "@" $+			
			
		" " $+ "@" $+		 
		
		(L.L.menu_select_vis) 1 =
		{if}
			"» " $+
		{else}
			"  " $+
		{endif}
		"Информа=ионное табло                            " $+ "@" $+ 
		
		(S.$.salon_menu)
		
	{else}
		0 (S.L.salon_menu_visible)		
	{endif}	

	
	(L.L.salon_menu)	
	(L.L.salon_menu1_visible) &&		
	{if}		
		0 (S.L.salon_menu_visible) 					
		
		"САЛОН" "@" $+
		" " $+ "@" $+	
		
		"     Устройство      " $+ "@" $+
		" " $+ "@" $+		
		" включено/выключено  " $+ "@" $+ 	

		" " $+ "@" $+		
			
		(S.$.salon_menu1)
		
	{else}
		0 (S.L.salon_menu1_visible)		
	{endif}			
	
{end}