escPos property
ESC/POS DLE EOT 4 (roll paper sensor), then DLE EOT 2 would give
the cover; the paper sensor alone covers the common case.
Implementation
static final escPos = PrinterStatusQuery._(
Uint8List.fromList([0x10, 0x04, 0x04]),
(b) {
// Every DLE EOT reply has bit 1 set and bit 7 clear; anything else is
// not a status byte (some printers echo) -- treat as unknown.
if (b & 0x12 != 0x12 || b & 0x81 != 0) return PrinterReadiness.unknown;
if (b & 0x60 != 0) return PrinterReadiness.paperOut;
return PrinterReadiness.ready;
},
);