Handle overflow in bootloop
This commit is contained in:
parent
89e215a609
commit
6699b70f14
4
init.lua
4
init.lua
@ -10,6 +10,9 @@ bootledtimer:register(500, tmr.ALARM_AUTO, function (t)
|
||||
counter1=counter1+1
|
||||
spaceLeds = math.max(MAXLEDS - (counter1*2), 0)
|
||||
ws2812.write(string.char(128,0,0):rep(counter1) .. string.char(0,0,0):rep(spaceLeds) .. string.char(0,0,64):rep(counter1))
|
||||
if ((counter1*2) > 114) then
|
||||
t:unregister()
|
||||
end
|
||||
end)
|
||||
bootledtimer:start()
|
||||
|
||||
@ -59,6 +62,7 @@ initTimer:register(5000, tmr.ALARM_SINGLE, function (t)
|
||||
(file.open("timecore.lua")) or
|
||||
(file.open("wordclock.lua")) or
|
||||
(file.open("displayword.lua")) or
|
||||
(file.open("websrv_diet.lua")) or
|
||||
(file.open("mqtt.lua")) or
|
||||
(file.open("ds18b20.lua")) or
|
||||
(file.open("telnet.lua"))
|
||||
|
@ -26,7 +26,7 @@ if [ $# -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua telnet.lua wordclock.lua init.lua"
|
||||
FILES="displayword.lua main.lua timecore.lua webpage.html websrv_diet.lua telnet.lua wordclock.lua init.lua"
|
||||
else
|
||||
FILES=$2
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user