Use bounded hardware CDC for the Full G2 repeater console

This commit is contained in:
mikecarper committed 2026-10-04 21:11:18 -07:00
1 parent fed810ff50
commit 8bc3d2e476
3 files changed
+23 -1

No files matched your search

+7
View File
@@ -130,7 +130,14 @@ class SerialLogLine {
inline void serialLogBegin() {
#if defined(ESP32_PLATFORM) && defined(ARDUINO_USB_CDC_ON_BOOT) && \
(ARDUINO_USB_CDC_ON_BOOT == 1)
#if defined(ARDUINO_USB_MODE) && ARDUINO_USB_MODE == 1
// Arduino 2.0.17 HWCDC decrements an unsigned retry counter when its
// host stops reading. A zero timeout can underflow; retain the bounded
// timeout established by prepareUsbLoggingPort().
Serial.setTxTimeoutMs(5);
#else
Serial.setTxTimeoutMs(0);
#endif
#endif
}