From 845d4388fc9e1d560928204b696e59c3ead80dfc Mon Sep 17 00:00:00 2001 From: Jonas Kittner Date: Wed, 20 Oct 2021 21:28:13 +0200 Subject: [PATCH] fix bug where byte str comparision was done incorrectly --- adafruit_gps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_gps.py b/adafruit_gps.py index 5859b32..af7132d 100644 --- a/adafruit_gps.py +++ b/adafruit_gps.py @@ -113,7 +113,7 @@ def _read_degrees(data, index, neg): def _parse_talker(data_type): # Split the data_type into talker and sentence_type - if data_type[0] == b"P": # Proprietary codes + if data_type[:1] == b"P": # Proprietary codes return (data_type[:1], data_type[1:]) return (data_type[:2], data_type[2:])