Skip to content

serial_device read_line() does not parse lines correctly #40

Closed
@mstovenour

Description

Under certain circumstances read_line() does not properly detect the \r\n end of line sequence. This function reads all the data waiting in the serial device buffer and parses it up to the first \r\n. It then saves any remainder in self._buffer for the next function invocation. If that remainder contains a \r\n then the newline is not detected. This results in messages that are concatenated together with \r\n between them.

This occurs because any data waiting in self._buffer is not parsed for newlines.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions