1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-07-04 11:20:19 +00:00

reduce memory footprint

This commit is contained in:
David Gauchard
2023-07-18 19:49:58 +02:00
parent 678a2ccf53
commit c3bf9c5d00
4 changed files with 109 additions and 25 deletions

View File

@ -87,20 +87,20 @@ enum Verbosity : uint8_t
class ESPUIClass
{
public:
#ifdef ESP32
ESPUIClass()
{
verbosity = Verbosity::Quiet;
jsonUpdateDocumentSize = 2000;
jsonInitialDocumentSize = 8000;
sliderContinuous = false;
#ifdef ESP32
ControlsSemaphore = xSemaphoreCreateMutex();
xSemaphoreGive(ControlsSemaphore);
#endif // def ESP32
}
unsigned int jsonUpdateDocumentSize;
unsigned int jsonInitialDocumentSize;
bool sliderContinuous;
SemaphoreHandle_t ControlsSemaphore = NULL;
#endif // def ESP32
unsigned int jsonUpdateDocumentSize = 2000;
unsigned int jsonInitialDocumentSize = 8000;
unsigned int jsonChunkNumberMax = 0;
bool sliderContinuous = false;
void onWsEvent(AsyncWebSocket* server, AsyncWebSocketClient* client, AwsEventType type, void* arg, uint8_t* data, size_t len);
bool captivePortal = true;
@ -205,17 +205,13 @@ public:
void jsonReload();
void jsonDom(uint16_t startidx, AsyncWebSocketClient* client = nullptr, bool Updating = false);
Verbosity verbosity;
Verbosity verbosity = Verbosity::Quiet;
AsyncWebServer* server;
protected:
friend class ESPUIclient;
friend class ESPUIcontrol;
#ifdef ESP32
SemaphoreHandle_t ControlsSemaphore = NULL;
#endif // def ESP32
void RemoveToBeDeletedControls();
AsyncWebSocket* ws;