Merge branch 'master' into sim2

This commit is contained in:
ollo 2020-01-29 20:47:00 +01:00
commit f79524f6b2

View File

@ -65,8 +65,10 @@ function sendPage(conn, nameOfFile, replaceMap)
--reset amount of sent bytes, as we reached the end --reset amount of sent bytes, as we reached the end
sentBytes=0 sentBytes=0
-- send the rest -- send the rest
conn:send(buf) if (string.len(buf) > 0) then
print("Sent rest") conn:send(buf)
print("Sent rest")
end
end end
end end
@ -153,6 +155,9 @@ function startWebServer()
if (payload:find("GET /") ~= nil) then if (payload:find("GET /") ~= nil) then
httpSending=true httpSending=true
stopWordclock() stopWordclock()
if (color == nil) then
color=string.char(0,128,0)
end
ws2812.write(string.char(0,0,0):rep(56) .. color:rep(2) .. string.char(0,0,0):rep(4) .. color:rep(2) .. string.char(0,0,0):rep(48)) ws2812.write(string.char(0,0,0):rep(56) .. color:rep(2) .. string.char(0,0,0):rep(4) .. color:rep(2) .. string.char(0,0,0):rep(48))
-- Start Time after 3 minute -- Start Time after 3 minute
tmr.alarm(5, 180000, 0 ,function() tmr.alarm(5, 180000, 0 ,function()