'##############
'JKZ Script
'##############

'JKZ (Integrated Board Information System)
'Postaveno na zĂˇkladu MPC od Daniel94



'Script Version: 1.1
'Omsi release: 1.0

'Needs:
'- 

'Revision History:
'- Marty515		30.12.2013		Created
'- Marty515		15.02.2014		Mody, JKZ
'- Daniel94		22.03.2014		Budíky + platnost JŘ


'--------------------------------------------------------------------------------

'IBIS-Modi:

'	16 znaků
'   2  řádky


'----------------------
'	Trigger
'----------------------
{trigger:mpc_L}
	(T.L.ev_IBIS_piep)
	(L.L.mpc_zadani_pozice) 1 - (S.L.mpc_zadani_pozice)
	(L.L.JKZ_mod) 9 = {if} (L.L.mpc_zadani_pozice) 0 = {if} 8 (S.L.JKZ_mod) {endif} {endif}
	(L.L.mpc_zadani_pozice) 1 < {if} 1 (S.L.mpc_zadani_pozice) {endif}
	

	
{end}

{trigger:mpc_P}
	(T.L.ev_IBIS_piep)
	(L.L.mpc_zadani_pozice) 1 + (S.L.mpc_zadani_pozice)
	(L.L.JKZ_mod) 8 = {if} 9 (S.L.JKZ_mod) 1 (S.L.mpc_zadani_pozice) {endif}
	(L.L.JKZ_mod) 2  = {if} (L.L.mpc_zadani_pozice) 7 > {if} 7 (S.L.mpc_zadani_pozice) {endif} {endif}
	(L.L.JKZ_mod) 3 = (L.L.JKZ_mod) 9 = || {if} (L.L.mpc_zadani_pozice) 4 > {if} 4 (S.L.mpc_zadani_pozice) {endif} {endif}
	
		
	
{end}

{trigger:JKZ_cislo_vozu}
	(T.L.ev_IBIS_piep)
	
	10 (S.L.JKZ_mod)

{end}

{trigger:JKZ_cas_datum}
	(T.L.ev_IBIS_piep)
	
	11 (S.L.JKZ_mod)

{end}

{trigger:JKZ_hlaseni}
	(T.L.ev_IBIS_piep)
	
	20 (S.L.JKZ_mod)


{end}

{macro:JKZ_hlaseni_vyhlasit}
	"slhla\" (L.$.JKZ_Cislo_hlaseni) $+ ".wav" $+ $msg (T.F.JKZ_sluzebni_hlaseni_play)
{end}

{macro:JKZ_boot}

	(L.L.JKZ_start) 0 =
	{if}
		0 (S.L.JKZ_boot_ok)
	{endif}
	
	(L.L.JKZ_start) 1 =
	(L.L.JKZ_boot_ok) 0 = &&
	{if}
		(L.L.JKZ_boot_prubeh_ok) 0 =		
		{if}
			(L.L.JKZ_boot_prubeh) (L.S.Timegap) + (S.L.JKZ_boot_prubeh)
				"BIOS 2.2 (c)2002"  "@" $+
				"                " $+
				(S.$.JKZ_Disp)
				
			(L.L.JKZ_boot_prubeh) 2 >
			{if}
				""
				"FPP-U     r.3.d6"  "@" $+
				"c2000 JKZ s.r.o." $+
				(S.$.JKZ_Disp)
						
									
									(L.L.JKZ_boot_prubeh) 5 >
									{if}
										1 (S.L.JKZ_mod)
										0 (S.L.JKZ_boot_prubeh)
										1 (S.L.JKZ_boot_prubeh_ok)

									{endif}

			{endif}
		{endif}

	{else}
		0 (S.L.JKZ_boot_prubeh)
		0 (S.L.JKZ_boot_prubeh_ok)
		0 (S.L.JKZ_mod)
	{endif}
	

	
{end}

{macro:JKZ}
	(L.L.elec_busbar_main_sw) 1 =
	{if}
	1 (S.L.JKZ_start)

	{else}
	0 (S.L.JKZ_start)
	0 (S.L.JKZ_mod)


	
			(L.L.Baterky_odpocet_ok) 1 =		
		{if}
			(L.L.Baterky_odpocet) (L.S.Timegap) + (S.L.Baterky_odpocet)
				""
				"   "  "@" $+
				"                " $+
				(S.$.JKZ_Disp)
				
				
				(L.L.Baterky_odpocet) 15 >
			{if}
			
			"0" (S.$.1cs) (S.$.2cs) (S.$.3cs) (S.$.4cs) (S.$.5cs) (S.$.6cs) (S.$.7cs)
			"0" (S.$.tmp_sl1) (S.$.tmp_sl2) (S.$.tmp_sl3) (S.$.tmp_sl4) (S.$.tmp_sl5) (S.$.tmp_sl6) (S.$.tmp_sl7) (S.$.JKZ_budik_odjezd) (S.$.1budik_hod) (S.$.2budik_hod) (S.$.3budik_hod) (S.$.4budik_hod) 
			(L.$.1cs) (L.$.2cs) (L.$.3cs) (L.$.4cs) (L.$.5cs) (L.$.6cs) (L.$.7cs) (S.$.mpc_klavesnice_txt)
			
				0 (S.L.IBIS_busstop)
			(L.$.1cs) (L.$.2cs) $+ (L.$.3cs) $+ $StrToFloat (S.L.mpc_linka)
			(L.$.4cs) (L.$.5cs) $+ $StrToFloat (S.L.mpc_trasa)
			(L.$.6cs) (L.$.7cs) $+ $StrToFloat (S.L.jkz_den)
	
			(L.L.mpc_linka) 100 * (L.L.mpc_trasa) + (M.V.GetRouteIndex) (S.L.IBIS_RouteIndex)
			(M.V.GetRouteTerminusIndex) (S.L.IBIS_TerminusIndex)
			(L.L.mpc_linka) 100 * (L.L.mpc_trasa) + (S.L.IBIS_Linie_Complex)
'			(L.$.6cs) (L.$.7cs) $+ $StrToFloat (S.L.IBIS_Linie_Suffix)
			(L.$.mpc_klavesnice_txt) (S.$.mpc_sluzba_txt)
					
				0 (S.L.Baterky_odpocet_ok)	
				0 (S.L.Baterky_odpocet)
				
			{endif}
			{endif}
			{endif}
	
	
	(L.L.JKZ_mod) 1 =
	{if}
		(L.L.mpc_linka) 1 > 
		{if}
			""
			(L.$.act_busstop) "" $= !
			(L.L.JKZ_platnost_JR) 1 = &&
			{if}
				(L.L.JKZ_platnost_JR_ok) (L.S.Timegap) + (S.L.JKZ_platnost_JR_ok)
				(L.L.JKZ_platnost_JR_ok) 0.6 >
				{if}
					"Služba " $+ (L.$.mpc_klavesnice_txt) $+ "  " $+ "@" $+
					(L.$.JR_verze) $+ (S.$.JKZ_Disp)
					(L.L.JKZ_platnost_JR_ok) 4 >
					{if}
						""
						0 (S.L.JKZ_platnost_JR_ok) (S.L.JKZ_platnost_JR)
						(L.$.JKZ_DS2) $+ (L.$.JKZ_Odchylka) $+  "@" $+
						(L.$.JKZ_priznak) $+ (L.$.JKZ_pasmo) $+ " " $+ (L.L.mpc_linka) "03" $IntToStrEnh $+ (L.L.mpc_trasa) "02" $IntToStrEnh $+ " " $+ (L.$.mpc_cas_txt) $+
						(S.$.JKZ_Disp)
					
						1 (S.L.CAS_promena)
					{endif}
				{endif}
			{else}
				""
				(L.$.JKZ_DS2) $+ (L.$.JKZ_Odchylka) $+  "@" $+
				(L.$.JKZ_priznak) $+ (L.$.JKZ_pasmo) $+ " " $+ (L.L.mpc_linka) "03" $IntToStrEnh $+ (L.L.mpc_trasa) "02" $IntToStrEnh $+ " " $+ (L.$.mpc_cas_txt) $+
				(S.$.JKZ_Disp)
				
				1 (S.L.CAS_promena)			
			{endif}
			
			
			(L.L.mpc_linka) 910 =
			{if}
						""
			"0000000000000000" $+ "@" $+
			"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
			(S.$.JKZ_Disp)
			{endif}
			
			(L.L.mpc_linka) 912 =
			{if}
			""
			(L.$.JKZ_DS2) $+ (L.$.JKZ_Odchylka) $+  "@" $+
			"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
			(S.$.JKZ_Disp)
			{endif}
			
		{else}
			""
			"0000000000000000" $+ "@" $+
			"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
			(S.$.JKZ_Disp)
		{endif}
	{endif}
	
	(L.L.JKZ_mod) 2 =
	{if}
	
	(L.L.mpc_linka) 1 > 
		{if}
		""
		
				"Služba " $+ (L.$.mpc_klavesnice_txt) $+ "  " $+ "@" $+
				(L.$.JKZ_priznak) $+ (L.$.JKZ_pasmo) $+ " " $+ (L.L.mpc_linka) "03" $IntToStrEnh $+ (L.L.mpc_trasa) "02" $IntToStrEnh $+ " " $+ (L.$.mpc_cas_txt) $+
				(S.$.JKZ_Disp)
		
					(L.L.mpc_linka) 910 =
					(L.L.mpc_linka) 912 = ||
			{if}
					""
		
				"Služba " $+ (L.$.mpc_klavesnice_txt) $+ "  " $+ "@" $+
				"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
				(S.$.JKZ_Disp)
			{endif}
			
		
		{else}
		""
		
				"Služba " $+ (L.$.mpc_klavesnice_txt) $+ "  " $+ "@" $+
				"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
				(S.$.JKZ_Disp)
				
				
	{endif}	
	{endif}
	
		
	(L.L.JKZ_mod) 3 =
	{if}
		""	
				"číslo cíle  " $+ (L.$.mpc_klavesnice_txt) $+ "@" $+
				"                " $+
				(S.$.JKZ_Disp)
	
	{endif}
	
	(L.L.JKZ_mod) 4 =
	{if}

		""
		"číslo cíle ???? " $+ "@" $+
		" # ^ manuál ^ # "  $+
		(S.$.JKZ_Disp)

				

	{endif}
	
	
	(L.L.JKZ_mod) 5 =
	{if}
	""
	(L.L.mpc_linka) 1 > 
		{if}
		
			""
			(L.$.IBIS_lcd_dest2a) (L.$.mpc_klavesnice_txt) $+ "@" $+
			(L.$.JKZ_priznak) $+ (L.$.JKZ_pasmo) $+ " " $+ (L.L.mpc_linka) "03" $IntToStrEnh $+ (L.L.mpc_trasa) "02" $IntToStrEnh $+ " " $+ (L.$.mpc_cas_txt) $+
			(S.$.JKZ_Disp)
			
			(L.L.mpc_linka) 910 =
			(L.L.mpc_linka) 912 = ||
			{if}
			(L.$.IBIS_lcd_dest2a) (L.$.mpc_klavesnice_txt) $+ "@" $+
				"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
				(S.$.JKZ_Disp)
			{endif}
		
		{else}
		""
		
				(L.$.IBIS_lcd_dest2a) (L.$.mpc_klavesnice_txt) $+ "@" $+
				"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
				(S.$.JKZ_Disp)
				
				
	{endif}	
	{endif}
	
		(L.L.JKZ_mod) 6 =
	{if}
			(L.L.mpc_linka) 1 > 
			{if}
				""
				(L.$.JKZ_DS) $+ (L.$.JKZ_Odchylka2) $+  "@" $+
				(L.$.JKZ_priznak) $+ (L.$.JKZ_pasmo) $+ " " $+ (L.L.mpc_linka) "03" $IntToStrEnh $+ (L.L.mpc_trasa) "02" $IntToStrEnh $+ " " $+ (L.$.mpc_cas_txt) $+
				(S.$.JKZ_Disp)
				
				2 (S.L.CAS_promena)
				
				
			(L.L.mpc_linka) 910 =
			{if}
						""
			"0000000000000000" $+ "@" $+
			"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
			(S.$.JKZ_Disp)
			{endif}
			
			(L.L.mpc_linka) 912 =
			{if}
			""
			(L.$.JKZ_DS) $+ (L.$.JKZ_Odchylka2) $+  "@" $+
			"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
			(S.$.JKZ_Disp)
			{endif}
			
			{else}
			""
			"0000000000000000" $+ "@" $+
			"   PREJEZD " $+ (L.$.mpc_cas_txt) $+
			(S.$.JKZ_Disp)
		{endif}
				
	{endif}

		(L.L.JKZ_mod) 7 =
	{if}
				""
				(L.$.JKZ_DS2) $+ (L.$.JKZ_Odchylka) $+  "@" $+
				"   < POLOHA >   " $+
				(S.$.JKZ_Disp)
	{endif}
	
	(L.L.JKZ_mod) 8 =
	(L.L.JKZ_mod) 9 = ||
	{if}
		""
		"Budík " (L.$.JKZ_budik_odjezd) $+ "         " $+ "@" $+
		"čas:  " $+ (L.$.1budik_hod) $+ (L.$.2budik_hod) $+ ":" $+ (L.$.3budik_hod) $+ (L.$.4budik_hod) $+ "     " $+ (S.$.JKZ_Disp)
	{endif}
	
	
	(L.L.JKZ_mod) 10 = 
	{if}			
		""
		"č. vozu " $+ (L.$.Number) $+ "    " $+ "@" $+
		(L.$.Skupina_RDST) $+ (S.$.JKZ_Disp)

	{endif}
	
	(L.L.JKZ_mod) 11 = 
	{if}
		""
		(L.$.JKZ_DS2) $+ (L.$.JKZ_Odchylka) $+  "@" $+
		"Letní   " $+ (L.$.mpc_datum_txt) $+ (S.$.JKZ_Disp)
	{endif}
	
	(L.L.JKZ_mod) 20 = 
	{if}
		""
		"Hlášení: " $+ (L.$.JKZ_Cislo_hlaseni) $+ "     " $+  "@" $+
		(L.$.JKZ_Text_hlaseni) $+ (S.$.JKZ_Disp)
	{endif}
	
	(L.L.JKZ_mod) 21 = 
	{if}
		""
		"Hlášení: " $+ (L.$.JKZ_Cislo_hlaseni_zadani) $+ "     " $+  "@" $+
		"    " $+ (S.$.JKZ_Disp)
	{endif}
	
	(L.L.JKZ_mod) 30 = 
	{if}
		""
		"Hlásič: <" $+ (L.$.HLASENI_HLASITOST) $+ " >    " $+  "@" $+
		"Rdst:    2      " $+ (S.$.JKZ_Disp)
	{endif}
	
{end}


{macro:MPC_init}
	1 (S.L.mpc_zadani_pozice) (S.L.CAS_promena)
	"0" (S.$.1cs) (S.$.2cs) (S.$.3cs) (S.$.4cs) (S.$.5cs) (S.$.6cs) (S.$.7cs)
	"0" (S.$.tmp_sl1) (S.$.tmp_sl2) (S.$.tmp_sl3) (S.$.tmp_sl4) (S.$.tmp_sl5) (S.$.tmp_sl6) (S.$.tmp_sl7) (S.$.JKZ_budik_odjezd) (S.$.1budik_hod) (S.$.2budik_hod) (S.$.3budik_hod) (S.$.4budik_hod) 
	(L.$.1cs) (L.$.2cs) (L.$.3cs) (L.$.4cs) (L.$.5cs) (L.$.6cs) (L.$.7cs) (S.$.mpc_klavesnice_txt)
	"10" (S.$.JKZ_Cislo_hlaseni)
	"2" (S.$.HLASENI_HLASITOST)
	(M.L.sluzebni_hlaseni)
{end}

{macro:MPC_frame}


(L.L.schedule_active)
	{if}
	
		""
		(L.L.IBIS_RouteIndex) (M.V.GetBusstopCount) 1 - (L.L.IBIS_busstop) 1 + >=
		{if}

			(L.L.IBIS_busstop) (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh ":" $+
			l0 l1 - 60 * s0 trunc s1 (L.L.cas_zaokrouhleni) + "02" $IntToStrEnh $+ (S.$.JKZ_Odchylka)	
			l0 l1 - 60 * trunc 30 > {if} 1 (S.L.cas_zaokrouhleni) {else} 0 (S.L.cas_zaokrouhleni) {endif}
			
			""
			(L.L.IBIS_busstop) (M.V.GetTTBusstopDep) (S.L.MPC_zastavka_cas)
			(L.L.MPC_zastavka_cas) (L.S.Time) - (S.L.MPC_zastavka_odchylka)
			
			(L.L.MPC_zastavka_odchylka) abs 3600 / s0 trunc s1 
			(L.L.MPC_zastavka_odchylka) 0 < {if} 0 (S.L.MPC_odchylka_barva) "+" {else} 1 (S.L.MPC_odchylka_barva) "-" {endif} 
			l0 l1 - 60 * s0 trunc s1 "02" $IntToStrEnh $+ ":" $+ 
			l0 l1 - 60 * trunc "02" $IntToStrEnh $+ (S.$.JKZ_Odchylka2)		
	
		{else}
			
			(L.L.IBIS_busstop) (M.V.GetTTBusstopArr) 3600 / s0 trunc s1 "02" $IntToStrEnh ":" $+
			l0 l1 - 60 * s0 trunc s1 (L.L.cas_zaokrouhleni) + "02" $IntToStrEnh $+ (S.$.JKZ_Odchylka)	
			l0 l1 - 60 * trunc 30 > {if} 1 (S.L.cas_zaokrouhleni) {else} 0 (S.L.cas_zaokrouhleni) {endif}
			
			""
			(L.L.IBIS_busstop) (M.V.GetTTBusstopArr) (S.L.MPC_zastavka_cas)
			(L.L.MPC_zastavka_cas) (L.S.Time) - (S.L.MPC_zastavka_odchylka)
			
			(L.L.MPC_zastavka_odchylka) abs 3600 / s0 trunc s1 
			(L.L.MPC_zastavka_odchylka) 0 < {if} 0 (S.L.MPC_odchylka_barva) "+" {else} 1 (S.L.MPC_odchylka_barva) "-" {endif} 
			l0 l1 - 60 * s0 trunc s1 "02" $IntToStrEnh $+ ":" $+ 
			l0 l1 - 60 * trunc "02" $IntToStrEnh $+ (S.$.JKZ_Odchylka2)	
			
		{endif} 
		
		(L.L.IBIS_busstop) 0 =
		{if}
			(L.$.JKZ_budik_odjezd) $StrToFloat 60 * (S.L.JKZ_budik_odjezd)
			(L.L.MPC_zastavka_odchylka) (L.L.JKZ_budik_odjezd) - 0 <
			(L.L.MPC_zastavka_odchylka) (L.L.JKZ_budik_odjezd) - -1 > &&
			{if}
				1 (S.L.budik_aktivni)
			{endif}
		{endif}
	
		{else}
		" 00:00" (S.$.JKZ_Odchylka2)	
		"00:00" (S.$.JKZ_Odchylka)
		{endif}
	
	""
	(L.L.elec_busbar_main)
	{if}
		1 (S.L.mpc_on)
	{else}
		0 (S.L.mpc_on)
	{endif}
		(L.L.JKZ_mod) 1 =
		(L.L.JKZ_mod) 5 = ||
		(L.L.JKZ_mod) 6 = ||
	{if}
		(L.L.mpc_zadani_pozice) 1 = {if} "                " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 2 = {if} "                " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 3 = {if} "                " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 4 = {if} "                " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
	{endif}
	
	(L.L.JKZ_mod) 2 =
	{if}
		(L.L.mpc_zadani_pozice) 1 = {if} "       _        " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 2 = {if} "        _       " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 3 = {if} "         _      " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 4 = {if} "          _     " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 5 = {if} "           _    " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 6 = {if} "            _   " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 7 = {if} "             _  " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}	
		{endif}
	(L.L.JKZ_mod) 3 =
	{if}
		(L.L.mpc_zadani_pozice) 1 = {if} "            _   " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 2 = {if} "             _  " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 3 = {if} "              _ " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 4 = {if} "               _" $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor) {endif}
	{endif}
	
	(L.L.JKZ_mod) 8 =
	{if}
		"      _         " $+  "@" $+ " " $+ (S.$.mpc_klavesnice_kurzor)
	{endif}
	
	(L.L.JKZ_mod) 9 =
	{if}
		(L.L.mpc_zadani_pozice) 1 = {if} "" $+  "@" $+ "      _         " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 2 = {if} "" $+  "@" $+ "       _        " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 3 = {if} "" $+  "@" $+ "         _      " $+ (S.$.mpc_klavesnice_kurzor) {endif}
		(L.L.mpc_zadani_pozice) 4 = {if} "" $+  "@" $+ "          _     " $+ (S.$.mpc_klavesnice_kurzor) {endif}
	{endif}
	"" (L.S.Day) "02" $IntToStrEnh "." $+ (L.S.Month) "02" $IntToStrEnh $+ "." $+ (L.S.Year) $IntToStr 2 $SetLengthR $+ (S.$.mpc_datum_txt)
	"" (L.S.Time) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+ l0 l1 - 60 * trunc "02" $IntToStrEnh $+ (S.$.mpc_cas_txt)
	
	(L.L.elec_busbar_main)
	{if}
		(L.$.3budik_hod) (L.$.4budik_hod) $+ $StrToFloat 60 *
		(L.$.1budik_hod) (L.$.2budik_hod) $+ $StrToFloat 3600 * + (S.L.JKZ_budik_hod)
		(L.L.JKZ_budik_hod) (L.S.Time) - 0 <
		(L.L.JKZ_budik_hod) (L.S.Time) - -1 > &&
		{if}
			1 (S.L.budik_aktivni)
		{endif}
	{endif}
{end}

{macro:MPC_zadani}
	(L.L.JKZ_mod) 2 =
	{if}
		(L.L.mpc_zadani_pozice) 1 = {if} (L.$.JKZ_Promena) (S.$.1cs) {endif}
		(L.L.mpc_zadani_pozice) 2 = {if} (L.$.JKZ_Promena) (S.$.2cs) {endif}
		(L.L.mpc_zadani_pozice) 3 = {if} (L.$.JKZ_Promena) (S.$.3cs) {endif}
		(L.L.mpc_zadani_pozice) 4 = {if} (L.$.JKZ_Promena) (S.$.4cs) {endif}
		(L.L.mpc_zadani_pozice) 5 = {if} (L.$.JKZ_Promena) (S.$.5cs) {endif}
		(L.L.mpc_zadani_pozice) 6 = {if} (L.$.JKZ_Promena) (S.$.6cs) {endif}
		(L.L.mpc_zadani_pozice) 7 = {if} (L.$.JKZ_Promena) (S.$.7cs) {endif}
		(L.L.mpc_zadani_pozice) 1 + (S.L.mpc_zadani_pozice)
		(L.L.mpc_zadani_pozice) 7 > {if} 1 (S.L.mpc_zadani_pozice) {endif}
		(L.$.1cs) (S.$.tmp_sl1) (L.$.2cs) (S.$.tmp_sl2) $+ (L.$.3cs) (S.$.tmp_sl3) $+ (L.$.4cs) (S.$.tmp_sl4) $+ (L.$.5cs) (S.$.tmp_sl5) $+ (L.$.6cs) (S.$.tmp_sl6) $+ (L.$.7cs) (S.$.tmp_sl7) $+ (S.$.mpc_klavesnice_txt)
	{endif}
	
		(L.L.JKZ_mod) 3 =
			{if}
		(L.L.mpc_zadani_pozice) 1 = {if} (L.$.JKZ_Promena) (S.$.1cs) {endif}
		(L.L.mpc_zadani_pozice) 2 = {if} (L.$.JKZ_Promena) (S.$.2cs) {endif}
		(L.L.mpc_zadani_pozice) 3 = {if} (L.$.JKZ_Promena) (S.$.3cs) {endif}
		(L.L.mpc_zadani_pozice) 4 = {if} (L.$.JKZ_Promena) (S.$.4cs) {endif}
	(L.L.mpc_zadani_pozice) 1 + (S.L.mpc_zadani_pozice)
	(L.L.mpc_zadani_pozice) 4 > {if} 4 (S.L.mpc_zadani_pozice) {endif}
(L.$.1cs) (L.$.2cs) $+ (L.$.3cs) $+ (L.$.4cs) $+ (S.$.mpc_klavesnice_txt)
	{endif}
	
	(L.L.JKZ_mod) 9 =
	{if}
		(L.L.mpc_zadani_pozice) 1 = {if} (L.$.JKZ_Promena) (S.$.1budik_hod) {endif}
		(L.L.mpc_zadani_pozice) 2 = {if} (L.$.JKZ_Promena) (S.$.2budik_hod) {endif}
		(L.L.mpc_zadani_pozice) 3 = {if} (L.$.JKZ_Promena) (S.$.3budik_hod) {endif}
		(L.L.mpc_zadani_pozice) 4 = {if} (L.$.JKZ_Promena) (S.$.4budik_hod) {endif}
		(L.L.mpc_zadani_pozice) 1 + (S.L.mpc_zadani_pozice)
		(L.L.mpc_zadani_pozice) 4 > {if} 4 (S.L.mpc_zadani_pozice) {endif}
	{endif}
	
	(L.L.JKZ_mod) 8 =
	{if}
		(L.$.JKZ_Promena) (S.$.JKZ_budik_odjezd)
		9 (S.L.JKZ_mod)
		1 (S.L.mpc_zadani_pozice)
	{endif}
{end}

{macro:sluzebni_hlaseni}
	(L.$.JKZ_Cislo_hlaseni) "03" $=
	{if}
		"-konečná CZ/AJ  " (S.$.JKZ_Text_hlaseni)
	{endif}
 
	(L.$.JKZ_Cislo_hlaseni) "10" $=
	{if}
		"-prostor:1.dveře" (S.$.JKZ_Text_hlaseni)
	{endif}

	(L.$.JKZ_Cislo_hlaseni) "11" $=
	{if}
		"-prostor:kočárek" (S.$.JKZ_Text_hlaseni)
	{endif}

	(L.$.JKZ_Cislo_hlaseni) "12" $=
	{if}
		"-prostor:vozík  " (S.$.JKZ_Text_hlaseni)
	{endif}

	(L.$.JKZ_Cislo_hlaseni) "20" $=
	{if}
		"-závada,přestup " (S.$.JKZ_Text_hlaseni)
	{endif}
	
	(L.$.JKZ_Cislo_hlaseni) "30" $=
	{if}
		"-čekání na Jr   " (S.$.JKZ_Text_hlaseni)
	{endif}
	
	(L.$.JKZ_Cislo_hlaseni) "58" $=
	{if}
		"A:Skalka-N.Míru " (S.$.JKZ_Text_hlaseni)
	{endif}
	
{end}

