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, data = data,
} }
end end
return M displayword = M

View File

@ -1,5 +1,7 @@
-- Main Module -- Main Module
displayword = {}
function startSetupMode() function startSetupMode()
tmr.stop(0) tmr.stop(0)
tmr.stop(1) tmr.stop(1)
@ -54,12 +56,12 @@ function displayTime()
else else
words.briPercent=nil words.briPercent=nil
end end
dp = dofile("displayword.lc") dofile("displayword.lc")
if (dp ~= nil) then if (displayword ~= nil) then
ledBuf = dp.generateLEDs(words, color, color1, color2, color3, color4) 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(dp.data.drawnCharacters)) print("Local time : " .. time.year .. "-" .. time.month .. "-" .. time.day .. " " .. time.hour .. ":" .. time.minute .. ":" .. time.second .. " char: " .. tostring(displayword.data.drawnCharacters))
end end
dp = nil displayword = nil
if (ledBuf ~= nil) then if (ledBuf ~= nil) then
--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

View File

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