now really working
This commit is contained in:
parent
e9c28e8547
commit
6082899391
12
main.lua
12
main.lua
@ -58,17 +58,19 @@ function displayTime()
|
|||||||
|
|
||||||
--if lines 4 to 6 are inverted due to hardware-fuckup, unfuck it here
|
--if lines 4 to 6 are inverted due to hardware-fuckup, unfuck it here
|
||||||
if ((inv46 ~= nil) and (inv46 == "on")) then
|
if ((inv46 ~= nil) and (inv46 == "on")) then
|
||||||
tempstring = ledBuf:sub(1,101) -- first 33 leds
|
tempstring = ledBuf:sub(1,99) -- first 33 leds
|
||||||
rowend = {44,55,66}
|
rowend = {44,55,66}
|
||||||
for _, startled in ipairs(rowend) do
|
for _, startled in ipairs(rowend) do
|
||||||
for i = 0,10 do
|
for i = 0,10 do
|
||||||
tempstring = tempstring .. ledBuf:sub((startled-i)*3,(startled-i)*3+2)
|
tempstring = tempstring .. ledBuf:sub((startled-i)*3-2,(startled-i)*3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
tempstring = tempstring .. ledBuf:sub((67*3),ledBuf:len())
|
tempstring = tempstring .. ledBuf:sub((67*3)-2,ledBuf:len())
|
||||||
ws2812.write(tempstring)
|
ws2812.write(tempstring)
|
||||||
|
tempstring=nil
|
||||||
else
|
else
|
||||||
ws2812.write(ledBuf)
|
ws2812.write(ledBuf)
|
||||||
|
ledBuf=nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -82,7 +84,7 @@ function displayTime()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- cleanup
|
-- cleanup
|
||||||
ledBuf=nil
|
|
||||||
words=nil
|
words=nil
|
||||||
time=nil
|
time=nil
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
|
Loading…
Reference in New Issue
Block a user