Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions adafruit_gps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries
# SPDX-FileCopyrightText: 2021 James Carr
#
# SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -344,8 +345,8 @@ def _read_sentence(self):
# pylint: disable=len-as-condition
# This needs to be refactored when it can be tested.

# Only continue if we have at least 32 bytes in the input buffer
if self.in_waiting < 32:
# Only continue if we have at least 11 bytes in the input buffer
if self.in_waiting < 11:
return None

sentence = self.readline()
Expand Down Expand Up @@ -679,9 +680,9 @@ def write(self, bytestr):

@property
def in_waiting(self):
"""Returns number of bytes available in UART read buffer, always 32
"""Returns number of bytes available in UART read buffer, always 16
since I2C does not have the ability to know how much data is available"""
return 32
return 16

def readline(self):
"""Returns a newline terminated bytearray, must have timeout set for
Expand Down