[FIX] hw_escpos: increase timeout for slow matrix printers
Some printers (e.g. matrix/impact printers) may have a hard time keeping up with the text output, and may trigger timeout errors because of this, even though they would otherwise produce a correct result. Increasing the default timeout to 5s (from the default 1s) should take care of most slow printers out there.
This commit is contained in:
parent
af381bf7ec
commit
f431cee99a
|
@ -82,7 +82,7 @@ class Usb(Escpos):
|
|||
|
||||
def _raw(self, msg):
|
||||
""" Print any command sent in raw format """
|
||||
if len(msg) != self.device.write(self.out_ep, msg, self.interface):
|
||||
if len(msg) != self.device.write(self.out_ep, msg, self.interface, timeout=5000):
|
||||
self.device.write(self.out_ep, self.errorText, self.interface)
|
||||
raise TicketNotPrinted()
|
||||
|
||||
|
|
Loading…
Reference in New Issue