text brick debug prints
This commit is contained in:
@@ -17,6 +17,7 @@ local function getBit(gate, val)
|
||||
elseif gatedata.listenState=="terminate" then
|
||||
if val==1 then
|
||||
local v = gatedata.valReceived
|
||||
print("text brick received "..v)
|
||||
local iscolor = math.floor(v/512)==1 -- first bit
|
||||
if iscolor then
|
||||
local printdomain = (math.floor(v/128)%2)==1 and "terminal" or "terminalInv" -- 8th lowest bit
|
||||
@@ -44,7 +45,7 @@ local function changeTo(gate, val)
|
||||
local tick = Gate.gettick(gate)
|
||||
local ticks = tick-gatedata.lastTickChanged
|
||||
|
||||
local bits = math.min(ticks, 10)
|
||||
local bits = math.min(ticks, textbrick2_bitsNeeded+3)
|
||||
for i = 1, bits do
|
||||
getBit(gate, val)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user