- respect net debug on/off state
This commit is contained in:
Blaz Kristan 2023-02-08 10:18:41 +01:00
parent bca92883d2
commit e7d50d2614

View File

@ -3,7 +3,7 @@
#ifdef WLED_DEBUG_HOST
size_t NetworkDebugPrinter::write(uint8_t c) {
if (!WLED_CONNECTED) return 0;
if (!WLED_CONNECTED || !netDebugEnabled) return 0;
if (!debugPrintHostIP && !debugPrintHostIP.fromString(netDebugPrintHost)) {
#ifdef ESP8266
@ -24,7 +24,7 @@ size_t NetworkDebugPrinter::write(uint8_t c) {
}
size_t NetworkDebugPrinter::write(const uint8_t *buf, size_t size) {
if (!WLED_CONNECTED || buf == nullptr) return 0;
if (!WLED_CONNECTED || buf == nullptr || !netDebugEnabled) return 0;
if (!debugPrintHostIP && !debugPrintHostIP.fromString(netDebugPrintHost)) {
#ifdef ESP8266