module display word loadable in the simulation
This commit is contained in:
parent
69a2158ca6
commit
b9e3812a72
@ -254,4 +254,4 @@ M = {
|
|||||||
data = data,
|
data = data,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return M
|
displayword = M
|
||||||
|
12
main.lua
12
main.lua
@ -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
|
||||||
|
@ -160,9 +160,8 @@ public class WS2812Simulation implements LuaSimulation {
|
|||||||
callScript(this.scriptName);
|
callScript(this.scriptName);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void callScript(String filename) {
|
private void callScript(String filename) {
|
||||||
|
Loading…
Reference in New Issue
Block a user