Clear rgb buffer before updating it
This commit is contained in:
parent
017aef74f6
commit
a755a1e5b3
5
main.lua
5
main.lua
@ -145,6 +145,11 @@ function normalOperation()
|
|||||||
heapusage=nil
|
heapusage=nil
|
||||||
alive = alive + 1
|
alive = alive + 1
|
||||||
else
|
else
|
||||||
|
if (colorBg ~= nil) then
|
||||||
|
rgbBuffer:fill(string.byte(colorBg,1), string.byte(colorBg,2), string.byte(colorBg,3)) -- disable all LEDs
|
||||||
|
else
|
||||||
|
rgbBuffer:fill(0,0,0) -- disable all LEDs
|
||||||
|
end
|
||||||
displayTime()
|
displayTime()
|
||||||
alive = alive + 1
|
alive = alive + 1
|
||||||
end
|
end
|
||||||
|
@ -165,7 +165,7 @@ function startWebServer()
|
|||||||
sec, _ = rtctime.get()
|
sec, _ = rtctime.get()
|
||||||
file.open(configFile.. ".new", "w+")
|
file.open(configFile.. ".new", "w+")
|
||||||
file.write("-- Config\n" .. "station_cfg={}\nstation_cfg.ssid=\"" .. _POST.ssid .. "\"\nstation_cfg.pwd=\"" .. _POST.password .. "\"\nstation_cfg.save=false\nwifi.sta.config(station_cfg)\n")
|
file.write("-- Config\n" .. "station_cfg={}\nstation_cfg.ssid=\"" .. _POST.ssid .. "\"\nstation_cfg.pwd=\"" .. _POST.password .. "\"\nstation_cfg.save=false\nwifi.sta.config(station_cfg)\n")
|
||||||
file.write("sntpserverhostname=\"" .. _POST.sntpserver .. "\"\n" .. "timezoneoffset=\"" .. _POST.timezoneoffset .. "\"\n".. "inv46=" .. tostring(_POST.inv46) .. "\n" .. "dim=" .. tostring(_POST.dim) .. "\n")
|
file.write("sntpserverhostname=\"" .. _POST.sntpserver .. "\"\n" .. "timezoneoffset=\"" .. _POST.timezoneoffset .. "\"\n".. "inv46=on\n" .. "dim=" .. tostring(_POST.dim) .. "\n")
|
||||||
|
|
||||||
if ( _POST.fcolor ~= nil) then
|
if ( _POST.fcolor ~= nil) then
|
||||||
-- color=string.char(_POST.green, _POST.red, _POST.blue)
|
-- color=string.char(_POST.green, _POST.red, _POST.blue)
|
||||||
|
Loading…
Reference in New Issue
Block a user