fixing logging
This commit is contained in:
@ -5,15 +5,22 @@ class WsSerial{
|
||||
std::queue<String> debug;
|
||||
|
||||
public:
|
||||
inline void print(const String& line){ debug.push(line); }
|
||||
inline void println(const String& line){ debug.push(line); }
|
||||
inline void print(const String& line){
|
||||
// enable debug the debugging Serial.println(line.c_str());
|
||||
debug.push(line);
|
||||
}
|
||||
inline void println(const String& line){
|
||||
// enable debug the debugging Serial.println(line.c_str());
|
||||
debug.push(line);
|
||||
}
|
||||
inline void println(const float num){ println(String(num)) ; };
|
||||
|
||||
inline const String& pop(){ const String& first = debug.front(); debug.pop(); return first;};
|
||||
inline const String& first(){ return debug.front();};
|
||||
inline void pop(){ debug.pop(); };
|
||||
inline bool empty(){ return debug.empty();};
|
||||
};
|
||||
|
||||
static WsSerial debug_out;
|
||||
extern WsSerial debug_out;
|
||||
|
||||
#if(false)
|
||||
#define DEBUG_OUT Serial
|
||||
|
@ -1,10 +1,8 @@
|
||||
#include <ESPAsyncTCP.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <AsyncEventSource.h>
|
||||
#include <LittleFS.h>
|
||||
|
||||
static AsyncWebServer server(80);
|
||||
static AsyncEventSource events("/events");
|
||||
|
||||
void server_setup();
|
||||
void server_loop();
|
||||
|
Reference in New Issue
Block a user