fix: 0 -> 1, even more deep-sleep fix (#2073)

setTimeout(0) on the serial could trigger a subtle but obnoxious
underflow.

Eat a milli, save a reset button.


Did you use AI tools to help write this code? no
This commit is contained in:
Jeremy Klein
2026-05-19 22:40:44 -04:00
committed by GitHub
parent 0ddefdc0c9
commit 75764bc6eb
+1 -5
View File
@@ -310,13 +310,9 @@ void setup() {
// enumeration before we touch the CDC state — otherwise cold boot races
// and the host has to be physically replugged for logs to flow. Warm reboot
// worked without the delay because USB was already enumerated.
//
// setTxTimeoutMs(0) makes writes non-blocking — the HWCDC TX FIFO drops
// bytes harmlessly if the host isn't actively draining, instead of blocking
// for the default 250 ms per write and chaining into a firmware hang.
delay(250);
Serial.begin(115200);
logSerial.setTxTimeoutMs(0);
logSerial.setTxTimeoutMs(1); // This is a load-bearing 1. Do not modify.
#endif
HalSystem::begin();