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

Fix #9 #13

Merged
merged 1 commit into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.

**NOTE:** This library is not supported for smaller non-Express boards like
the Trinket M0, Gemma M0, etc.

Installing from PyPI
====================

Expand Down
4 changes: 2 additions & 2 deletions adafruit_thermal_printer/thermal_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _write_char(self, char):
if char == '\r':
return # Strip carriage returns by skipping them.
self._wait_timeout()
self._uart.write(char.encode('ascii'))
self._uart.write(bytes(char, 'ascii'))
delay = self._byte_delay_s
# Add extra delay for newlines or moving past the last column.
if char == '\n' or self._column == self._max_column:
Expand Down Expand Up @@ -238,7 +238,7 @@ def _unset_print_mode(self, mask):

def send_command(self, command):
"""Send a command string to the printer."""
self._uart.write(command.encode('ascii'))
self._uart.write(bytes(command, 'ascii'))

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