Closed saitahmety closed 1 year ago
Moreover, getStatuses function does not return response when at least one of these 4 statuses is undefined. Because of "if (buffer.length < 4)" condition.
But I want to get the other statuses even if the byte data of one status is undefined. When I remove "if (buffer.length < 4)" condition output like this,
Can we remove this condition ?
Please revision code and release NPM. It's important for my project. Thanks for this awesome project.
@saitahmety the printer must return all four statuses in this method if the memory switch 1-3 is set to "receive buffer full" from "receive buffer full or offline", as you can see here https://github.com/mike42/escpos-php/issues/43#issuecomment-389453232
"receive buffer full" => printer always responds "receive buffer full or offline" => printer does not respond in some situations such as cover open or paper out
After changing this memory switch, it always returns successfully.
But there is still a bug because the promise is not rejected when "receive buffer full or offline" is set, so I created a pull https://github.com/node-escpos/driver/pull/46 to solve it
Oh I got it, thank you so much @felipeguimaraes2 , solved on this https://github.com/node-escpos/driver/pull/46
I want to use getStatus function and when I call it as follows, PrinterStatus and other classes not exported. So,
let printerStatus = printer.getStatus(PrinterStatus);
// class type can't workthis exports can be added
or
let printerStatus = printer.getStatus("PrinterStatus");
// string type can't work this code can be addedOr is there any other solution besides these ? How should I use getStatus() function ?