debug message cleanup
changed some non-critical USER_PRINT debug messages into DEBUG_PRINT
This commit is contained in:
@@ -21,7 +21,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
//WLEDMM add USER_PRINT
|
||||
// String temp;
|
||||
// serializeJson(doc, temp);
|
||||
USER_PRINTF("deserializeConfig\n");
|
||||
DEBUG_PRINTF("deserializeConfig\n");
|
||||
|
||||
bool needsSave = false;
|
||||
//int rev_major = doc["rev"][0]; // 1
|
||||
@@ -1065,7 +1065,7 @@ void serializeConfig() {
|
||||
usermods.addToConfig(usermods_settings);
|
||||
|
||||
//WLEDMM add USER_PRINT
|
||||
USER_PRINTF("serializeConfig\n");
|
||||
DEBUG_PRINTF("serializeConfig\n");
|
||||
|
||||
File f = WLED_FS.open("/cfg.json", "w");
|
||||
if (f) serializeJson(doc, f);
|
||||
|
||||
@@ -53,11 +53,13 @@ bool deserializeSegment(JsonObject elem, byte it, byte presetId)
|
||||
{
|
||||
const bool iAmGroot = !inDeepCall; // WLEDMM will only be true if this is the toplevel of the recursion.
|
||||
//WLEDMM add USER_PRINT
|
||||
#ifdef WLED_DEBUG
|
||||
if (elem.size()!=1 || elem["stop"] != 0) { // not for {"stop":0}
|
||||
String temp;
|
||||
serializeJson(elem, temp);
|
||||
USER_PRINTF("deserializeSegment %s\n", temp.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
byte id = elem["id"] | it;
|
||||
if (id >= strip.getMaxSegments()) return false;
|
||||
@@ -374,9 +376,11 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
|
||||
{
|
||||
const bool iAmGroot = !inDeepCall; // WLEDMM will only be true if this is the toplevel of the recursion.
|
||||
//WLEDMM add USER_PRINT
|
||||
#ifdef WLED_DEBUG
|
||||
String temp;
|
||||
serializeJson(root, temp);
|
||||
USER_PRINTF("deserializeState %s\n", temp.c_str());
|
||||
#endif
|
||||
|
||||
bool stateResponse = root[F("v")] | false;
|
||||
|
||||
|
||||
@@ -436,6 +436,9 @@ void WLED::setup()
|
||||
USER_FLUSH(); delay(100);
|
||||
USER_PRINTLN();
|
||||
USER_PRINT(F("---WLED "));
|
||||
#ifdef WLEDMM_FASTPATH
|
||||
USER_PRINT("=FASTPATH= ");
|
||||
#endif
|
||||
USER_PRINT(versionString);
|
||||
USER_PRINT(" ");
|
||||
USER_PRINT(VERSION);
|
||||
|
||||
@@ -10,7 +10,7 @@ static volatile unsigned long wsLastLiveTime = 0; // WLEDMM
|
||||
//uint8_t* wsFrameBuffer = nullptr;
|
||||
|
||||
#if !defined(ARDUINO_ARCH_ESP32) || defined(WLEDMM_FASTPATH) // WLEDMM
|
||||
#define WS_LIVE_INTERVAL 160
|
||||
#define WS_LIVE_INTERVAL 120
|
||||
#else
|
||||
#define WS_LIVE_INTERVAL 80
|
||||
#endif
|
||||
@@ -19,14 +19,14 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp
|
||||
{
|
||||
if(type == WS_EVT_CONNECT){
|
||||
//client connected
|
||||
USER_PRINTLN(F("WS client connected."));
|
||||
DEBUG_PRINTLN(F("WS client connected."));
|
||||
sendDataWs(client);
|
||||
} else if(type == WS_EVT_DISCONNECT){
|
||||
//client disconnected
|
||||
if (client->id() == wsLiveClientId) wsLiveClientId = 0;
|
||||
USER_PRINTLN(F("WS client disconnected."));
|
||||
DEBUG_PRINTLN(F("WS client disconnected."));
|
||||
} else if(type == WS_EVT_DATA){
|
||||
USER_PRINTLN(F("WS event data."));
|
||||
DEBUG_PRINTLN(F("WS event data."));
|
||||
// data packet
|
||||
AwsFrameInfo * info = (AwsFrameInfo*)arg;
|
||||
if(info->final && info->index == 0 && info->len == len){
|
||||
@@ -91,7 +91,7 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp
|
||||
}
|
||||
} else if(type == WS_EVT_ERROR){
|
||||
//error was received from the other end
|
||||
DEBUG_PRINTLN(F("WS error."));
|
||||
USER_PRINTLN(F("WS error."));
|
||||
|
||||
} else if(type == WS_EVT_PONG){
|
||||
//pong message was received (in response to a ping request maybe)
|
||||
@@ -102,7 +102,7 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp
|
||||
|
||||
void sendDataWs(AsyncWebSocketClient * client)
|
||||
{
|
||||
USER_PRINTF("sendDataWs\n");
|
||||
DEBUG_PRINTF("sendDataWs\n");
|
||||
if (!ws.count()) return;
|
||||
AsyncWebSocketMessageBuffer * buffer;
|
||||
|
||||
@@ -147,7 +147,7 @@ void sendDataWs(AsyncWebSocketClient * client)
|
||||
#endif
|
||||
if (!buffer || heap1-heap2<len) {
|
||||
releaseJSONBufferLock();
|
||||
DEBUG_PRINTLN(F("WS buffer allocation failed."));
|
||||
USER_PRINTLN(F("WS buffer allocation failed."));
|
||||
ws.closeAll(1013); //code 1013 = temporary overload, try again later
|
||||
ws.cleanupClients(0); //disconnect all clients to release memory
|
||||
ws._cleanBuffers();
|
||||
@@ -212,7 +212,7 @@ static bool sendLiveLedsWs(uint32_t wsClient) // WLEDMM added "static"
|
||||
if (wsBuf == nullptr) { // 8266 does not support exceptions
|
||||
#endif
|
||||
wsBuf = nullptr;
|
||||
DEBUG_PRINTLN(F("WS buffer allocation failed."));
|
||||
USER_PRINTLN(F("WS buffer allocation failed."));
|
||||
//ws.closeAll(1013); //code 1013 = temporary overload, try again later
|
||||
//ws.cleanupClients(0); //disconnect all clients to release memory
|
||||
ws._cleanBuffers();
|
||||
|
||||
Reference in New Issue
Block a user