'######################################################################
'     Script für Sonstige Variablen und Funktionen von Simon_2002
'######################################################################

'Script für Abbiegeassistent

'(c) 10.01.2021 Simon_2002

'Script Version: 1.0
'Omsi release: 1.0

'Revision History:
'- Simon_2002		10.01.2021	Erstellung des Skripts
'- Simon_2002		16.01.2021	Kleinere Veränderungen

'--------------------------------------------------------------
' 			Trigger
'--------------------------------------------------------------

{trigger:Abbiegeassistent}
(L.L.Abbiegeassistent) ! (S.L.Abbiegeassistent)

(L.L.Abbiegeassistent)
{if}
0 (S.L.Abbiegeassistent_reflexion) (S.L.Abbiegeassistent_startup)
1 (S.L.Abbiegeassistent_reflexion_neu) (S.L.Abbiegeassistent_startup_neu) 
{endif}

(L.L.Abbiegeassistent) !
{if}
1 (S.L.Abbiegeassistent_reflexion) (S.L.Abbiegeassistent_startup)
0 (S.L.Abbiegeassistent_reflexion_neu) (S.L.Abbiegeassistent_startup_neu) 
{endif}

{end}

'--------------------------------------------------------------
' 			Macro_frame
'--------------------------------------------------------------

{macro:Simon2002_frame}

'**************************************************************
' 			Abbiegeassistent
'**************************************************************

(L.L.C2_Elektronik)
{if}
	(L.L.Abbiegeassistent_time) (L.S.Timegap) + 10 min (S.L.Abbiegeassistent_time)

	(L.L.Abbiegeassistent_time) 0 >
	(L.L.Abbiegeassistent_time) 1 < &&
	{if}

		(L.L.Abbiegeassistent)
		{if}
		1 (S.L.Abbiegeassistent_startup_neu)
		{else}
		1 (S.L.Abbiegeassistent_startup)
		{endif}

		"Abbiegeassistent\Abbiegeassistent2.png" (S.$.Abbiegeassistent)
	{endif}
	(L.L.Abbiegeassistent_time) 1 >
	(L.L.Abbiegeassistent_time) 3 < &&
	{if}
		"Abbiegeassistent\Abbiegeassistent1.png" (S.$.Abbiegeassistent)
	{endif}
	(L.L.Abbiegeassistent_time) 3 >
	(L.L.Abbiegeassistent_time) 4 < &&
	{if}
		"Abbiegeassistent\Abbiegeassistent2.png" (S.$.Abbiegeassistent)
	{endif}
	(L.L.Abbiegeassistent_time) 4 >
	(L.L.Abbiegeassistent_time) 8 < &&
	{if}
		"Abbiegeassistent\Abbiegeassistent3.png" (S.$.Abbiegeassistent)
	{endif}
	(L.L.Abbiegeassistent_time) 8 >
	(L.L.Abbiegeassistent_time) 9.5 < &&
	{if}
		"Abbiegeassistent\Abbiegeassistent4.png" (S.$.Abbiegeassistent)
	{endif}
	(L.L.Abbiegeassistent_time) 9.5 >
	(L.L.Abbiegeassistent_time) 9.7 < &&
	{if}
		"Abbiegeassistent\Abbiegeassistent5.png" (S.$.Abbiegeassistent)
	{endif}
	(L.L.Abbiegeassistent_time) 9.7 >
	(L.L.Abbiegeassistent_time) 10 < &&
	{if}

		(L.L.Abbiegeassistent)
		{if}
		0 (S.L.Abbiegeassistent_startup_neu)
		{else}
		0 (S.L.Abbiegeassistent_startup)
		{endif}

		1 (S.L.Abbiegeassistent_an)
	{endif}

	(L.L.Abbiegeassistent_an) 1 =
	(L.L.C2_CP_Blinkerhebel_pos) 1 =
	{if}
		(L.L.Abbiegeassistent_time_delay_an) (L.S.Timegap) + 1.1 min (S.L.Abbiegeassistent_time_delay_an)

		(L.L.Abbiegeassistent_time_delay_an) 1.1 =
		{if}

		(L.L.Abbiegeassistent)
		{if}
		1 (S.L.Abbiegeassistent_reflexion_neu)
		{else}
		1 (S.L.Abbiegeassistent_reflexion)
		{endif}

		{endif}
	0 (S.L.Abbiegeassistent_time_delay_aus)
	{else}
		(L.L.Abbiegeassistent_time_delay_aus) (L.S.Timegap) + 1 min (S.L.Abbiegeassistent_time_delay_aus)

		(L.L.Abbiegeassistent_time_delay_aus) 1 =
		{if}

		(L.L.Abbiegeassistent)
		{if}
		0 (S.L.Abbiegeassistent_reflexion_neu)
		{else}
		0 (S.L.Abbiegeassistent_reflexion)
		{endif}

		{endif}
	0 (S.L.Abbiegeassistent_time_delay_an)
	{endif}

{else}
	0 (S.L.Abbiegeassistent_startup) (S.L.Abbiegeassistent_startup_neu) (S.L.Abbiegeassistent_time) (S.L.Abbiegeassistent_an) (S.L.Abbiegeassistent_reflexion) (S.L.Abbiegeassistent_reflexion_neu) (S.L.Abbiegeassistent_time_delay_aus) (S.L.Abbiegeassistent_time_delay_an)
{endif}

{end}