timecore and displayword needs to be compiled
This commit is contained in:
parent
72734f1337
commit
a355cff6e2
17
init.lua
17
init.lua
@ -21,10 +21,12 @@ function mydofile(mod)
|
||||
dofile( mod .. ".lua")
|
||||
elseif (file.open(mod .. "_diet.lua")) then
|
||||
dofile(mod .. "_diet.lua")
|
||||
elseif (file.open(mod .. "_diet.lc")) then
|
||||
dofile(mod .. "_diet.lc")
|
||||
elseif (file.open(mod)) then
|
||||
dofile(mod)
|
||||
else
|
||||
print("Error: " .. mod)
|
||||
print("NA: " .. mod)
|
||||
end
|
||||
end
|
||||
|
||||
@ -34,6 +36,19 @@ initTimer:register(5000, tmr.ALARM_SINGLE, function (t)
|
||||
t:unregister()
|
||||
initTimer=nil
|
||||
bootledtimer=nil
|
||||
local modlist = { "timecore" , "displayword" }
|
||||
for i,mod in pairs(modlist) do
|
||||
if (file.open(mod .. "_diet.lua")) then
|
||||
print(tostring(i) .. ". Compile " .. mod)
|
||||
ws2812.write(string.char(0,0,0):rep(11*i)..string.char(128,0,0):rep(11))
|
||||
node.compile(mod .. "_diet.lua")
|
||||
print("cleanup..")
|
||||
file.remove(mod .. "_diet.lua")
|
||||
node.restart()
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if ( file.open("config.lua") ) then
|
||||
--- Normal operation
|
||||
print("Starting main")
|
||||
|
4
main.lua
4
main.lua
@ -34,7 +34,7 @@ function displayTime()
|
||||
collectgarbage()
|
||||
mydofile("wordclock")
|
||||
if (wc ~= nil) then
|
||||
local words = wc.timestat(time.hour, time.minute)
|
||||
words = wc.timestat(time.hour, time.minute)
|
||||
if ((dim ~= nil) and (dim == "on")) then
|
||||
words.briPer=briPer
|
||||
if (words.briPer ~= nil and words.briPer < 3) then
|
||||
@ -51,7 +51,7 @@ function displayTime()
|
||||
if (dw ~= nil) then
|
||||
--if lines 4 to 6 are inverted due to hardware-fuckup, unfuck it here
|
||||
local invertRows=false
|
||||
if ((inv46 ~= nil) and (inv46 == "on")) then
|
||||
if ((inv46 ~= nil) and (inv46 == "on")) then
|
||||
invertRows=true
|
||||
end
|
||||
local c = dw.countChars(words)
|
||||
|
Loading…
Reference in New Issue
Block a user