handling of Serial on CDC USB board
... like the typical -C3 * Replaced a few direct Serial.printf with macros * Always check if Serial is connected before printing (CDC sometimes hangs when trying to send/receive without connection)
This commit is contained in:
@@ -767,7 +767,7 @@ void handleIR()
|
||||
if (results.value != 0) // only print results if anything is received ( != 0 )
|
||||
{
|
||||
if (!pinManager.isPinAllocated(hardwareTX) || pinManager.getPinOwner(hardwareTX) == PinOwner::DebugOut) // Serial TX pin (GPIO 1 on ESP32 and ESP8266)
|
||||
Serial.printf_P(PSTR("IR recv: 0x%lX\n"), (unsigned long)results.value);
|
||||
if (Serial) Serial.printf_P(PSTR("IR recv: 0x%lX\n"), (unsigned long)results.value);
|
||||
}
|
||||
decodeIR(results.value);
|
||||
irrecv->resume();
|
||||
|
||||
Reference in New Issue
Block a user