|
@@ -69,20 +69,6 @@ void onConfiguration(HttpRequest& request, HttpResponse& response)
|
|
|
cfg.BrightnessHigh = LedBrightMax;
|
|
|
}
|
|
|
}
|
|
|
- // Low light level trh.
|
|
|
- if (request.getPostParameter ("LLow").length () > 0) {
|
|
|
- cfg.LightTrhLow = request.getPostParameter ("LLow").toInt ();
|
|
|
- if (cfg.LightTrhLow < MinLightThreshold || cfg.LightTrhLow > MaxLightThreshold) {
|
|
|
- cfg.LightTrhLow = MinLightThreshold;
|
|
|
- }
|
|
|
- }
|
|
|
- // High light level trh.
|
|
|
- if (request.getPostParameter ("LHigh").length () > 0) {
|
|
|
- cfg.LightTrhHigh = request.getPostParameter ("LHigh").toInt ();
|
|
|
- if (cfg.LightTrhHigh < MinLightThreshold || cfg.LightTrhHigh > MaxLightThreshold) {
|
|
|
- cfg.LightTrhHigh = MaxLightThreshold;
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
saveConfig(cfg);
|
|
|
response.headers[HTTP_HEADER_LOCATION] = "/";
|
|
@@ -93,8 +79,6 @@ void onConfiguration(HttpRequest& request, HttpResponse& response)
|
|
|
auto& vars = tmpl->variables();
|
|
|
vars["SSID"] = cfg.NetworkSSID;
|
|
|
vars["TZ"] = String(cfg.AddTZ, 2);
|
|
|
- vars["LLow"] = String(cfg.LightTrhLow);
|
|
|
- vars["LHigh"] = String(cfg.LightTrhHigh);
|
|
|
vars["BLow"] = String(cfg.BrightnessLow);
|
|
|
vars["BMid"] = String(cfg.BrightnessMiddle);
|
|
|
vars["BHigh"] = String(cfg.BrightnessHigh);
|