'########################################
'#           CLIMATE CONTROL            #
'#                                      #
'#   	     LIAZ 5292.30    		#
'#                                      #
'#  Wizard | 2013 | omnibussimulator.ru #
'#                                      #
'########################################



'	Триггеры кнопок управления климат-контролем
{trigger:climate_control_on}
	(L.L.climate_control_target) ! (S.L.climate_control_target)
{end}

{trigger:climate_control_temp_up}

(L.L.interior_temperature) 1 + (S.L.interior_temperature)

(L.L.interior_temperature) 25 >
	{if}
	(L.L.interior_temperature) 1 - (S.L.interior_temperature)
	{endif}
(L.L.interior_temperature) $IntToStr (S.$.interior_temperature_display)
{end}

{trigger:climate_control_temp_down}

(L.L.interior_temperature) 1 - (S.L.interior_temperature)

(L.L.interior_temperature) 18 <
	{if}
	(L.L.interior_temperature) 1 + (S.L.interior_temperature)
	{endif}


(L.L.interior_temperature) $IntToStr (S.$.interior_temperature_display)
{end}

{trigger:climate_control_ventilation}
(L.L.climate_control_ventilation_target) ! (S.L.climate_control_ventilation_target)

	(L.L.elec_busbar_main)
	(L.L.cp_konvekta_sw) &&
		{if}
(L.L.climate_control_ventilation_target)
		{if}
	2 (S.L.konvekta_vent_select)
				0 (S.L.konvekta_vent_100) (S.L.konvekta_vent_50) (S.L.konvekta_vent_0)
		{else}
	0 (S.L.konvekta_vent_select)
				0 (S.L.konvekta_vent_100) (S.L.konvekta_vent_50) (S.L.konvekta_vent_0)
	{endif}
	{endif}

(L.L.interior_temperature) $IntToStr (S.$.interior_temperature_display)
{end}
'	END триггеры кнопок управления климат-контролем

'	Автоматические расчеты. Лучше не лезть =)
{macro:climate_control_main}

(L.L.elec_busbar_main)
(L.L.cp_konvekta_sw) &&
	{if}
(L.L.interior_temperature) (L.S.Weather_Temperature) < = 
	{if}
	1 (S.L.cockpit_heizregler_temp)
	0 (S.L.konvekta_air_out)
	1 (S.L.konvekta_air_int)
	0 (S.L.konvekta_air_mix)
'	2 (S.L.konvekta_vent_select)
	{else}	
		(L.L.interior_temperature) (L.S.Weather_Temperature) > =
			{if}
			0 (S.L.cockpit_heizregler_temp)
			1 (S.L.konvekta_air_out)
			0 (S.L.konvekta_air_int)
			0 (S.L.konvekta_air_mix)
'			0 (S.L.konvekta_vent_select)
{endif}
{endif}
{endif}


(L.L.interior_temperature) $IntToStr (S.$.interior_temperature_display)


{end}
	