WIP debug logging over TCP

This commit is contained in:
Kevin Hester
2021-08-18 09:25:17 -07:00
parent 2fd74d8f47
commit eaa15076cd
7 changed files with 30 additions and 13 deletions

View File

@@ -2,6 +2,7 @@
#include "RedirectablePrint.h"
#include "RTC.h"
#include "concurrency/OSThread.h"
// #include "wifi/WiFiServerAPI.h"
#include <assert.h>
#include <sys/time.h>
#include <time.h>
@@ -25,6 +26,10 @@ size_t RedirectablePrint::write(uint8_t c)
SEGGER_RTT_PutChar(SEGGER_STDOUT_CH, c);
#endif
// FIXME - clean this up, the whole relationship of this class to SerialConsole to TCP/bluetooth debug log output is kinda messed up. But for now, just have this hack to
// optionally send chars to TCP also
//WiFiServerPort::debugOut(c);
dest->write(c);
return 1; // We always claim one was written, rather than trusting what the
// serial port said (which could be zero)