From a66cc9d99d305fa70d670f2abe24911ebf138f4d Mon Sep 17 00:00:00 2001 From: hidaba Date: Sat, 22 Apr 2023 10:13:50 +0200 Subject: [PATCH] textarea with response --- PylontechMonitoring.ino | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/PylontechMonitoring.ino b/PylontechMonitoring.ino index 3e14205..48f086e 100644 --- a/PylontechMonitoring.ino +++ b/PylontechMonitoring.ino @@ -227,14 +227,7 @@ void handleReq() respOK = sendCommandAndReadSerialResponse(server.arg("code").c_str()); } - if(respOK) - { - server.send(200, "text/plain", g_szRecvBuff); - } - else - { - server.send(500, "text/plain", "????"); - } + handleRoot(); } void handleJsonOut() @@ -271,8 +264,10 @@ void handleRoot() { strncat(szTmp, "
Runtime log
", sizeof(szTmp)-1); - strncat(szTmp, "
Command:
Power | Help | Event Log | Time", sizeof(szTmp)-1); - strncat(szTmp, "", sizeof(szTmp)-1); + strncat(szTmp, "
Command:Power | Help | Event Log | Time
", sizeof(szTmp)-1); + strncat(szTmp, "
", sizeof(szTmp)-1); strncat(szTmp, "", sizeof(szTmp)-1); server.send(200, "text/html", szTmp); }