mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
Adafruit_USBD_CDC::write() blocks as long as DTR is asserted, even if the host stopped draining the FIFO. Every writeFrame() call and the GPX trail export wrote directly to Serial, so a serial monitor left open but idle could stall the main loop until the 30s watchdog reset the device. streamWriteUntil() caps the wait with an absolute deadline shared across chained writes, and only enters the wait loop when availableForWrite() is actually exhausted, so a healthy host sees no behavior change. The GPX export latches after the first stall to avoid paying the timeout once per write call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>