From a4eda884e3c8d1f3e07868309152ec18263902f1 Mon Sep 17 00:00:00 2001 From: ollo Date: Sun, 3 Jul 2016 18:48:46 +0200 Subject: [PATCH] use the Green,Red,Blue format for the new WS8266 --- webserver.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webserver.lua b/webserver.lua index e046596..fa16a30 100644 --- a/webserver.lua +++ b/webserver.lua @@ -72,7 +72,7 @@ function startWebServer() file.open(configFile.. ".new", "w+") file.write("-- Config\n" .. "wifi.sta.config(\"" .. _POST.ssid .. "\",\"" .. _POST.password .. "\")\n" .. "sntpserverhostname=\"" .. _POST.sntpserver .. "\"\n" .. "timezoneoffset=\"" .. _POST.timezoneoffset .. "\"\n") if ( (_POST.red ~= nil) and (_POST.green ~= nil) and (_POST.blue ~= nil) ) then - color=string.char(_POST.red, _POST.green, _POST.blue) + color=string.char(_POST.green, _POST.red, _POST.blue) end file.write("color=string.char(" .. string.byte(color,1) .. "," .. string.byte(color, 2) .. "," .. string.byte(color, 3) .. ")\n print(\"Config from " .. sec .. "\")\n") if (_POST.threequater ~= nil) then