local M = {}		


local function onReset() 
	electrics.values["rozetka"] = 0
	electrics.values["bak"] = 0	
	electrics.values["kozyR"] = 0	
	electrics.values["kozyL"] = 0	
	electrics.values["hzcho"] = 0	
	electrics.values["mir"] = 0	
	electrics.values["ameriL"] = 1	

end
local function updateGFX(dt) 
	  if electrics.values["ignitionLevel"] == 0 then
	
	electrics.values["mir"] = 1
else 		electrics.values["mir"] = 0

	end
	
  if electrics.values["ignitionLevel"] > 0.1 then
	electrics.values["navon"] = 1	
	else 	electrics.values["navon"] = 0
	end
	
	  if electrics.values["ignitionLevel"] == 0 then
	
	electrics.values["mapon"] = 0
	end
  if electrics.values["ignitionLevel"] > 0.1 then
	electrics.values["ameriL"] = 1
else
		electrics.values["ameriL"] = 0
end
		  if electrics.values["signal_left_input"] == 1 then
	electrics.values["ameriL"] = 0
	end
	
	
	  if electrics.values["ignitionLevel"] > 0.1 then
	electrics.values["ameriR"] = 1
else
		electrics.values["ameriR"] = 0
end
		  if electrics.values["signal_right_input"] == 1 then
	electrics.values["ameriR"] = 0
	end
end

-- public interface
M.onInit = onInit
M.onReset = onReset
M.updateGFX = updateGFX

return M