Still strying to make the encoding work
This commit is contained in:
parent
4ab8effc57
commit
4525acfb7d
@ -97,7 +97,7 @@ def print_text():
|
|||||||
printer = Adafruit_Thermal('/dev/serial0', 19200, timeout=5)
|
printer = Adafruit_Thermal('/dev/serial0', 19200, timeout=5)
|
||||||
printer.begin()
|
printer.begin()
|
||||||
printer.justify('L')
|
printer.justify('L')
|
||||||
printer.println(request.form['message'].encode('latin-1'))
|
printer.println((request.form['message']).encode())
|
||||||
printer.setSize('S')
|
printer.setSize('S')
|
||||||
printer.println(">> " + datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " " + session.get('user'))
|
printer.println(">> " + datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " " + session.get('user'))
|
||||||
printer.justify('C')
|
printer.justify('C')
|
||||||
|
Loading…
Reference in New Issue
Block a user