* web-serial: added internal buffer which is transmitted every second if its fill state is different from 0

* added uptime to serial console
* time will be instantiated in ESP (was in in JS)
* fixed SerialDebug inside hmRadio.h (thx to klahus1)
This commit is contained in:
lumapu 2022-09-09 14:46:18 +02:00
parent b1fa6e0702
commit 0759bff4cd
6 changed files with 79 additions and 24 deletions

View file

@ -12,6 +12,8 @@
#include "app.h"
#include "webApi.h"
#define WEB_SERIAL_BUF_SIZE 1024
class app;
class webApi;
@ -30,7 +32,7 @@ class web {
void onApiJs(AsyncWebServerRequest *request);
void onFavicon(AsyncWebServerRequest *request);
void showNotFound(AsyncWebServerRequest *request);
void showReboot(AsyncWebServerRequest *request);
void onReboot(AsyncWebServerRequest *request);
void showErase(AsyncWebServerRequest *request);
void showFactoryRst(AsyncWebServerRequest *request);
void onSetup(AsyncWebServerRequest *request);
@ -57,6 +59,12 @@ class web {
char *mVersion;
app *mMain;
webApi *mApi;
bool mSerialAddTime;
char mSerialBuf[WEB_SERIAL_BUF_SIZE];
uint16_t mSerialBufFill;
uint32_t mWebSerialTicker;
uint32_t mWebSerialInterval;
};
#endif /*__WEB_H__*/