query_status() returns bytes as seen in constants.py

This commit is contained in:
Alexandre Detiste 2023-12-13 23:24:20 +01:00
parent 180721c03c
commit 0f2ee2b8b5

View File

@ -16,7 +16,7 @@ import warnings
from abc import ABCMeta, abstractmethod # abstract base class support from abc import ABCMeta, abstractmethod # abstract base class support
from re import match as re_match from re import match as re_match
from types import TracebackType from types import TracebackType
from typing import Any, List, Literal, Optional, Union from typing import Any, Literal, Optional, Union
import barcode import barcode
import qrcode import qrcode
@ -1268,10 +1268,10 @@ class Escpos(object, metaclass=ABCMeta):
else: else:
self._raw(PANEL_BUTTON_OFF) self._raw(PANEL_BUTTON_OFF)
def query_status(self, mode: bytes) -> List[int]: def query_status(self, mode: bytes) -> bytes:
"""Query the printer for its status. """Query the printer for its status.
Returns an array of integers containing it. Returns byte array containing it.
:param mode: Integer that sets the status mode queried to the printer. :param mode: Integer that sets the status mode queried to the printer.
- RT_STATUS_ONLINE: Printer status. - RT_STATUS_ONLINE: Printer status.