Skip to content

Commit

Permalink
fix bug where byte str comparision was done incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
jkittner committed Oct 20, 2021
1 parent ca3885a commit 866ece9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] == "P": # Proprietary codes
return (data_type[:1], data_type[1:])

return (data_type[:2], data_type[2:])
Expand Down

0 comments on commit 866ece9

Please sign in to comment.