Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan for EPL first #40

Merged
merged 2 commits into from
Jan 10, 2023
Merged

Scan for EPL first #40

merged 2 commits into from
Jan 10, 2023

Conversation

Cellivar
Copy link
Owner

In testing I've found that ZPL printers are very reliable at telling you they are ZPL printers. Since we can reliably detect them and shortcut to ZPL detection, it's more time-consuming to query an EPL printer for ZPL features. I was initially okay with this, but then I ran into my latest problem child printer.

I have a printer here, standard ELP LP2844 with the latest firmware, which prints "ERR01" if you send it a ZPL command. No clue why. Settings appear normal. If you only send it EPL it's happy as a clam.

So, given that ZPL machines can be reliably detected and EPL machines can't, and there's a non-zero number of EPL machines that throw a fit when you try to talk ZPL at them, it makes sense to default to EPL first.

Who wants to bet CPCL throws a fit if you try to talk EPL or ZPL at it and I'm going to have a barrel of fun doing this autodetection in the future?

Bumps RC8.

@Cellivar Cellivar enabled auto-merge (squash) January 10, 2023 10:13
@github-actions
Copy link

Code coverage

Filename Statements Branches Functions Lines
src/Documents/BitmapGRF.ts 66.47% 57.41% 72.73% 64.38%
src/WebZlpError.ts 33.33% 100% 50% 33.33%
src/index.ts 100% 100% 100% 100%
src/Documents/Commands.ts 25.84% 41.94% 9.17% 9.58%
src/Printers/Configuration/PrinterOptions.ts 25.64% 66.67% 6.25% 12.12%
src/Printers/Models/PrinterModel.ts 39.02% 18.18% 11.11% 13.79%
src/Printers/Configuration/SerialPortSettings.ts 97.06% 100% 85.71% 85.71%
src/Printers/Configuration/MediaOptions.ts 69.23% 33.33% 62.5% 20%
src/Documents/ConfigDocument.ts 28.21% 0% 28.57% 28.21%
src/Documents/Document.ts 40.91% 0% 33.33% 45%
src/Documents/LabelDocument.ts 44.83% 60% 26.32% 38.46%
src/Documents/ReadyToPrintDocuments.ts 27.27% 100% 0% 22.22%
src/Printers/Communication/LineBreakTransformer.ts 0% 100% 0% 0%
src/Printers/Communication/PrinterCommunication.ts 76.92% 50% 50% 50%
src/Printers/Communication/UsbPrinterDeviceChannel.ts 4.23% 0% 0% 4.23%
src/Printers/Languages/EplPrinterCommandSet.ts 12.07% 12.86% 11.11% 12.57%
src/Printers/Models/PrinterModelDb.ts 11.54% 0% 0% 11.54%
src/Printers/Models/EplPrinterModels.ts 15.38% 100% 0% 15.38%
src/Printers/Languages/PrinterCommandSet.ts 20.2% 6.25% 16.67% 19.15%
src/Printers/PrinterCommunicationOptions.ts 0% 100% 0% 0%
src/Printers/Printer.ts 11.46% 0% 0% 11.58%
src/Printers/Languages/ZplPrinterCommandSet.ts 3.18% 0% 0% 3.21%
src/PrinterUsbManager.ts 4.65% 0% 0% 4.88%

@Cellivar Cellivar merged commit e314384 into main Jan 10, 2023
@Cellivar Cellivar deleted the bugfix/epl-first branch January 10, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant