Skip to content

Commit 654ab11

Browse files
committed
add print statements
1 parent ad488e5 commit 654ab11

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

RCMv3/websiteserver.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ void startWebServer()
230230
server.on("/saveMiscConfigInfo", HTTP_POST, [](AsyncWebServerRequest* request) {
231231
if (request->hasParam("miscConfigInfo", true)) {
232232
const AsyncWebParameter* p = request->getParam("miscConfigInfo", true);
233+
Serial.println("save ");
234+
Serial.println(p->value().c_str());
235+
Serial.println(p->value().length());
233236
prefs.begin("miscConfigInfo", false, nvsPartition);
234237
boolean success = prefs.putBytes("miscConfigInfo", p->value().c_str(), p->value().length());
235238
prefs.end();
@@ -248,6 +251,9 @@ void startWebServer()
248251
if (prefs.isKey("miscConfigInfo")) {
249252
size_t len = prefs.getBytesLength("miscConfigInfo"); // Preferences library allows long byte arrays but limits strings
250253
char buf[len+1];
254+
buf[len] = '\0';
255+
Serial.println("load ");
256+
Serial.println(buf);
251257
prefs.getBytes("miscConfigInfo", buf, len);
252258
request->send(200, "application/json", buf);
253259
} else {

0 commit comments

Comments
 (0)