Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 7af4493

Browse files
authored
Merge pull request #13 from fgallaire/master
Fix #9
2 parents a442a16 + 769275e commit 7af4493

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
2626
This is easily achieved by downloading
2727
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
2828

29-
**NOTE:** This library is not supported for smaller non-Express boards like
30-
the Trinket M0, Gemma M0, etc.
31-
3229
Installing from PyPI
3330
====================
3431

adafruit_thermal_printer/thermal_printer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def _write_char(self, char):
202202
if char == '\r':
203203
return # Strip carriage returns by skipping them.
204204
self._wait_timeout()
205-
self._uart.write(char.encode('ascii'))
205+
self._uart.write(bytes(char, 'ascii'))
206206
delay = self._byte_delay_s
207207
# Add extra delay for newlines or moving past the last column.
208208
if char == '\n' or self._column == self._max_column:
@@ -238,7 +238,7 @@ def _unset_print_mode(self, mask):
238238

239239
def send_command(self, command):
240240
"""Send a command string to the printer."""
241-
self._uart.write(command.encode('ascii'))
241+
self._uart.write(bytes(command, 'ascii'))
242242

243243
# Do initialization in warm_up instead of the initializer because this
244244
# initialization takes a long time (5 seconds) and shouldn't happen during

0 commit comments

Comments
 (0)