File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments