You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CircuitPython UART readline drops LF and returns None for blank lines #318
pslab.bus.busio.UART.readline() on main 08de0d0 consumes the LF byte before adding it to the returned data. A received blank line (b"\n") therefore returns None, just like a read timeout; b"hello\r\n" returns b"hello\r".
I reproduced this through the real UART status/read command path with controlled firmware replies and a controlled clock, without physical hardware. Five cases fail on unchanged main: blank LF, ordinary LF, CRLF, binary data followed by LF, and successive-line framing. Five controls for timeout, partial lines, raw reads, readinto and zero-length reads pass.
I would like to fix this by appending the received byte before testing for the line terminator. The local fix passes all ten cases and 33 existing hardware-independent tests, configured source lint, wheel/sdist builds and Sphinx documentation. It leaves constructor/parity handling, polling and partial-timeout behavior unchanged; this is separate from #317.
AI assistance: Codex helped investigate the contract, prepare the minimal fix and run command-level tests. No physical UART integration test is claimed.
Activity