remove some error prints
This commit is contained in:
		@@ -18,13 +18,13 @@ function Gate.addport(gate, port)
 | 
				
			|||||||
	Port.setgate(port, gate)
 | 
						Port.setgate(port, gate)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Logic Critical
 | 
				
			||||||
function Gate.getportstate(gate, index)
 | 
					function Gate.getportstate(gate, index)
 | 
				
			||||||
	return gate.port_nets[index].state
 | 
						return gate.port_nets[index].state
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Logic Critical
 | 
				
			||||||
function Gate.setportstate(gate, index, state)
 | 
					function Gate.setportstate(gate, index, state)
 | 
				
			||||||
	if type(state)~="number" then error("invalid state type - must be number (gate "..gate.objref..")") end
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	local port = gate.ports[index]
 | 
						local port = gate.ports[index]
 | 
				
			||||||
	if state ~= port.state then
 | 
						if state ~= port.state then
 | 
				
			||||||
		local group = port.group
 | 
							local group = port.group
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -170,8 +170,8 @@ function Group.mergeinto(group, group2)
 | 
				
			|||||||
	Simulation.dequeuegroup(GSim, group)
 | 
						Simulation.dequeuegroup(GSim, group)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Logic Critical
 | 
				
			||||||
function Group.setstate(group, state)
 | 
					function Group.setstate(group, state)
 | 
				
			||||||
	if type(state)~="number" then error("group state type must be number") end
 | 
					 | 
				
			||||||
	if state ~= group.state then
 | 
						if state ~= group.state then
 | 
				
			||||||
		local sim = GSim
 | 
							local sim = GSim
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -328,8 +328,8 @@ while 1 do
 | 
				
			|||||||
			Simulation.tickinit(sim)
 | 
								Simulation.tickinit(sim)
 | 
				
			||||||
			Simulation.tickinput(sim)
 | 
								Simulation.tickinput(sim)
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			for i = 1, OPT_TICK_MULT, 100 do
 | 
								for i = 1, OPT_TICK_MULT, 97 do
 | 
				
			||||||
				local ticksthis = math.min(OPT_TICK_MULT-i+1, 100)
 | 
									local ticksthis = math.min(OPT_TICK_MULT-i+1, 97)
 | 
				
			||||||
				for j = 1, ticksthis do
 | 
									for j = 1, ticksthis do
 | 
				
			||||||
					Simulation.ticklogic(sim)
 | 
										Simulation.ticklogic(sim)
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -235,6 +235,7 @@ function Simulation.connectport(sim, port)
 | 
				
			|||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Logic Critical
 | 
				
			||||||
function Simulation.queuegate(sim, gate)
 | 
					function Simulation.queuegate(sim, gate)
 | 
				
			||||||
	if not gate.in_queue then
 | 
						if not gate.in_queue then
 | 
				
			||||||
		table.insert(sim.gatequeue, gate)
 | 
							table.insert(sim.gatequeue, gate)
 | 
				
			||||||
@@ -260,6 +261,7 @@ function Simulation.queuegateinit(sim, gate)
 | 
				
			|||||||
	sim.initqueue[gate] = gate
 | 
						sim.initqueue[gate] = gate
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Logic Critical
 | 
				
			||||||
function Simulation.queuegroup(sim, group)
 | 
					function Simulation.queuegroup(sim, group)
 | 
				
			||||||
	if not group.in_queue then
 | 
						if not group.in_queue then
 | 
				
			||||||
		table.insert(sim.groupqueue, group)
 | 
							table.insert(sim.groupqueue, group)
 | 
				
			||||||
@@ -294,6 +296,7 @@ function Simulation.queuecallback(sim, gate, ...)
 | 
				
			|||||||
	sim.callbacks[gate.objref] = {...}
 | 
						sim.callbacks[gate.objref] = {...}
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Logic Critical
 | 
				
			||||||
function Simulation.ticklogic(sim)
 | 
					function Simulation.ticklogic(sim)
 | 
				
			||||||
	for k, group in ipairs(sim.groupqueue) do
 | 
						for k, group in ipairs(sim.groupqueue) do
 | 
				
			||||||
		Group.update(group)
 | 
							Group.update(group)
 | 
				
			||||||
@@ -309,7 +312,7 @@ function Simulation.ticklogic(sim)
 | 
				
			|||||||
	end
 | 
						end
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	for k, gate in ipairs(sim.gatequeue) do
 | 
						for k, gate in ipairs(sim.gatequeue) do
 | 
				
			||||||
		Gate.logic(gate)
 | 
							gate.logic(gate)
 | 
				
			||||||
		gate.in_queue = false
 | 
							gate.in_queue = false
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	sim.gatequeue = {}
 | 
						sim.gatequeue = {}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user