mirror of
https://github.com/python-escpos/python-escpos
synced 2025-09-13 09:09:58 +00:00
Paper sensor querying command (#242)
The DLE EOT command allows querying the status of several features of the printer. Added to the online/offline status developed in #237, this commit adds a paper sensor querying. Tested with an Epson TM-T20II, which only has an end-paper sensor. The near-end paper sensor should be tested with a compatible printer. However, the implementation is quite straight-forward.
This commit is contained in:
@@ -251,5 +251,10 @@ S_RASTER_2H = _PRINT_RASTER_IMG(b'\x02') # Set raster image double height
|
||||
S_RASTER_Q = _PRINT_RASTER_IMG(b'\x03') # Set raster image quadruple
|
||||
|
||||
# Status Command
|
||||
RT_STATUS_ONLINE = DLE + EOT + b'\x01';
|
||||
RT_MASK_ONLINE = 8;
|
||||
RT_STATUS = DLE + EOT
|
||||
RT_STATUS_ONLINE = RT_STATUS + b'\x01'
|
||||
RT_STATUS_PAPER = RT_STATUS + b'\x04'
|
||||
RT_MASK_ONLINE = 8
|
||||
RT_MASK_PAPER = 18
|
||||
RT_MASK_LOWPAPER = 30
|
||||
RT_MASK_NOPAPER = 114
|
Reference in New Issue
Block a user