Skip to content

Commit 78c06fc

Browse files
committed
encoding str works in both Cpython and circuitpython. fixed echotest
1 parent de1888a commit 78c06fc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

adafruit_gps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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('{:02x}'.format(checksum).upper().encode())
128+
self._uart.write(bytes('{:02x}'.format(checksum).upper(),"utf-8"))
129129
self._uart.write(b'\r\n')
130130

131131
@property

examples/gps_echotest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# Define RX and TX pins for the board's serial port connected to the GPS.
1212
# These are the defaults you should use for the GPS FeatherWing.
1313
# For other boards set RX = GPS module TX, and TX = GPS module RX pins.
14-
#RX = board.RX
15-
#TX = board.TX
14+
RX = board.RX
15+
TX = board.TX
1616

1717
# Create a serial connection for the GPS connection using default speed and
1818
# a slightly higher timeout (GPS modules typically update once a second).

0 commit comments

Comments
 (0)