Skip to content

Commit 2754d0e

Browse files
committed
change encoding to "ascii"
1 parent c62b31b commit 2754d0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_gps.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def update(self):
105105
if self.debug:
106106
print(sentence)
107107
data_type, args = sentence
108-
data_type = bytes(data_type.upper(), "utf-8")
108+
data_type = bytes(data_type.upper(), "ascii")
109109
if data_type == b'GPGGA': # GGA, 3d location fix
110110
self._parse_gpgga(args)
111111
elif data_type == b'GPRMC': # RMC, minimum location info
@@ -125,7 +125,7 @@ def send_command(self, command, add_checksum=True):
125125
for char in command:
126126
checksum ^= char
127127
self._uart.write(b'*')
128-
self._uart.write(bytes('{:02x}'.format(checksum).upper(), "utf-8"))
128+
self._uart.write(bytes('{:02x}'.format(checksum).upper(), "ascii))
129129
self._uart.write(b'\r\n')
130130

131131
@property

0 commit comments

Comments
 (0)