module display word loadable in the simulation

This commit is contained in:
ollo 2019-05-08 21:12:02 +02:00
parent 69a2158ca6
commit b9e3812a72
3 changed files with 9 additions and 8 deletions

View File

@ -254,4 +254,4 @@ M = {
data = data,
}
end
return M
displayword = M

View File

@ -1,5 +1,7 @@
-- Main Module
displayword = {}
function startSetupMode()
tmr.stop(0)
tmr.stop(1)
@ -54,12 +56,12 @@ function displayTime()
else
words.briPercent=nil
end
dp = dofile("displayword.lc")
if (dp ~= nil) then
ledBuf = dp.generateLEDs(words, color, color1, color2, color3, color4)
print("Local time : " .. time.year .. "-" .. time.month .. "-" .. time.day .. " " .. time.hour .. ":" .. time.minute .. ":" .. time.second .. " char: " .. tostring(dp.data.drawnCharacters))
dofile("displayword.lc")
if (displayword ~= nil) then
ledBuf = displayword.generateLEDs(words, color, color1, color2, color3, color4)
print("Local time : " .. time.year .. "-" .. time.month .. "-" .. time.day .. " " .. time.hour .. ":" .. time.minute .. ":" .. time.second .. " char: " .. tostring(displayword.data.drawnCharacters))
end
dp = nil
displayword = nil
if (ledBuf ~= nil) then
--if lines 4 to 6 are inverted due to hardware-fuckup, unfuck it here
if ((inv46 ~= nil) and (inv46 == "on")) then

View File

@ -162,7 +162,6 @@ public class WS2812Simulation implements LuaSimulation {
} catch (InterruptedException e) {
}
}
private void callScript(String filename) {