new algorithom works

This commit is contained in:
ollo 2019-05-10 23:42:20 +02:00
parent 32106035c2
commit a81cf8f31d

View File

@ -1,7 +1,7 @@
-- Module filling a buffer, sent to the LEDs -- Module filling a buffer, sent to the LEDs
local M local M
do do
local updateColor = function (data, inverseRow) local updateColor = function (data)
--FIXME magic missing to start on the left side --FIXME magic missing to start on the left side
return data.colorFg return data.colorFg
end end
@ -13,9 +13,9 @@ local drawLEDs = function(data, numberNewChars)
local tmpBuf=nil local tmpBuf=nil
for i=1,numberNewChars do for i=1,numberNewChars do
if (tmpBuf == nil) then if (tmpBuf == nil) then
tmpBuf = updateColor(data, inverseRow) tmpBuf = updateColor(data)
else else
tmpBuf=tmpBuf .. updateColor(data, inverseRow) tmpBuf=tmpBuf .. updateColor(data)
end end
data.drawnCharacters=data.drawnCharacters+1 data.drawnCharacters=data.drawnCharacters+1
end end
@ -134,8 +134,8 @@ if (words.fiveMin== 1) then
buf = buf .. line buf = buf .. line
--line 4-------- even row (so inverted) ------------- --line 4-------- even row (so inverted) -------------
if (words.after == 1) then if (words.after == 1) then
line= line .. space:rep(2) -- TG line= space:rep(2) -- TG
line= drawLEDs(data,4) -- NACH line= line .. drawLEDs(data,4) -- NACH
else else
line= space:rep(6) line= space:rep(6)
end end