Debug optimisations
This commit is contained in:
@@ -157,8 +157,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
char la[4] = "LA"; la[2] = offset+s; la[3] = 0; //LED mA
|
||||
char ma[4] = "MA"; ma[2] = offset+s; ma[3] = 0; //max mA
|
||||
if (!request->hasArg(lp)) {
|
||||
DEBUG_PRINT(F("No data for "));
|
||||
DEBUG_PRINTLN(s);
|
||||
DEBUG_PRINTF_P(PSTR("No data for %d\n"), s);
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < 5; i++) {
|
||||
@@ -729,7 +728,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
else subObj[name].add(value.toInt()); // we may have an int
|
||||
j++;
|
||||
}
|
||||
DEBUG_PRINT(F("[")); DEBUG_PRINT(j); DEBUG_PRINT(F("] = ")); DEBUG_PRINTLN(value);
|
||||
DEBUG_PRINTF_P(PSTR("[%d] = %s\n"), j, value.c_str());
|
||||
} else {
|
||||
// we are using a hidden field with the same name as our parameter (!before the actual parameter!)
|
||||
// to describe the type of parameter (text,float,int), for boolean parameters the first field contains "off"
|
||||
@@ -748,7 +747,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
} else if (type == "int") subObj[name] = value.toInt();
|
||||
else subObj[name] = value; // text fields
|
||||
}
|
||||
DEBUG_PRINT(F(" = ")); DEBUG_PRINTLN(value);
|
||||
DEBUG_PRINTF_P(PSTR(" = %s\n"), value.c_str());
|
||||
}
|
||||
}
|
||||
usermods.readFromConfig(um); // force change of usermod parameters
|
||||
@@ -809,8 +808,7 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply)
|
||||
if (!(req.indexOf("win") >= 0)) return false;
|
||||
|
||||
int pos = 0;
|
||||
DEBUG_PRINT(F("API req: "));
|
||||
DEBUG_PRINTLN(req);
|
||||
DEBUG_PRINTF_P(PSTR("API req: %s\n"), req.c_str());
|
||||
|
||||
//segment select (sets main segment)
|
||||
pos = req.indexOf(F("SM="));
|
||||
|
||||
Reference in New Issue
Block a user