Skip to content

serial poll() is always reading only 1 byte per call #35

Open
@ku3i

Description

@ku3i

if (_stream->available()) {

The current version is "taking forever" to read a GPS location, if the user has a significant delay (e.g. 500ms) in the loop() method, since on each GPS.available() call only 1 byte is read.

proposed fix: replace the "if" with a "while" in line 195 (GPS.cpp)

Another tip: make the GPS_DEBUG flag available in the begin() method (2nd argument or so), to better track issues like this easily and without modifying the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions