From 271e461be5683d0bcf6e2423671a0acfb459d477 Mon Sep 17 00:00:00 2001 From: andreas Date: Sun, 17 Oct 2021 18:17:05 +0200 Subject: [PATCH] working client connection --- src/main.cpp | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9c0a1f3..677bb36 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -142,6 +142,7 @@ void debug_log(char* str) { #endif } +#define JSON_OK "{\"status\":\"OK\"}" //embedded files extern const char indexFile[] asm("_binary_web_index_html_start"); @@ -158,7 +159,7 @@ void js_reset() // Wenn "http:///gauge.min.js" aufgerufen wurde void js_status(){ - DynamicJsonDocument status(50); + StaticJsonDocument<256> status; status["numcan"]=numCan; status["version"]=VERSION; status["wifiConnected"]=gwWifi.clientConnected(); @@ -173,11 +174,45 @@ void js_config(){ } void web_setConfig(){ + bool ok=true; + String error; + for (int i=0;i