Replaced obsolete static timers in lfs_fragments.lua (nodemcu #2764)

This commit is contained in:
Alistair Witt 2019-05-22 22:03:06 +10:00 committed by Gregor Hartmann
parent 036bff5665
commit bc1dd37aee
1 changed files with 7 additions and 4 deletions

View File

@ -56,8 +56,11 @@ if node.flashindex() == nil then
node.flashreload('flash.img')
end
tmr.alarm(0, 1000, tmr.ALARM_SINGLE,
function()
local fi=node.flashindex; return pcall(fi and fi'_init')
end)
local initTimer = tmr.create()
initTimer:register(1000, tmr.ALARM_SINGLE,
function()
local fi=node.flashindex; return pcall(fi and fi'_init')
end
)
initTimer:start()