variable name improved

This commit is contained in:
Ollo 2022-01-23 15:14:04 +01:00
parent 4ec5298ca5
commit 31cf255426

View File

@ -6,12 +6,12 @@ local MAXLEDS=110
local counter1=0 local counter1=0
ws2812.write(string.char(0,0,0):rep(114)) ws2812.write(string.char(0,0,0):rep(114))
local bootledtimer = tmr.create() local bootledtimer = tmr.create()
bootledtimer:register(75, tmr.ALARM_AUTO, function (t) bootledtimer:register(75, tmr.ALARM_AUTO, function (timer)
counter1=counter1+1 counter1=counter1+1
spaceLeds = math.max(MAXLEDS - (counter1*2), 0) spaceLeds = math.max(MAXLEDS - (counter1*2), 0)
ws2812.write(string.char(16,0,0):rep(counter1) .. string.char(0,0,0):rep(spaceLeds) .. string.char(0,0,8):rep(counter1)) ws2812.write(string.char(16,0,0):rep(counter1) .. string.char(0,0,0):rep(spaceLeds) .. string.char(0,0,8):rep(counter1))
if ((counter1*2) > 114) then if ((counter1*2) > 114) then
t:unregister() timer:unregister()
end end
end) end)
bootledtimer:start() bootledtimer:start()