Add sleep in sending fragments

Adding sleep prevents "USBTimeoutError: [Errno 110] Operation timed out".
This commit is contained in:
aerialist 2024-01-24 21:27:59 +09:00 committed by GitHub
parent 62c234f6f1
commit 7b97ff2e24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,7 @@ from __future__ import annotations
import textwrap
import warnings
import time
from abc import ABCMeta, abstractmethod # abstract base class support
from re import match as re_match
from types import TracebackType
@ -244,6 +245,7 @@ class Escpos(object, metaclass=ABCMeta):
impl=impl,
fragment_height=fragment_height,
)
time.sleep(0.3)
return
if impl == "bitImageRaster":