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

Don't assume USB device is configured when looking for endpoints #47

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

binaryf0x
Copy link
Collaborator

If the USB device is unconfigured then USBDevice.configuration will be null. The full USBDevice.configurations array should be used instead. After opening the device the correct configuration is selected.

If the USB device is unconfigured then USBDevice.configuration will be
null. The full USBDevice.configurations array should be used instead.
After opening the device the correct configuration is selected.
Copy link
Owner

@Cellivar Cellivar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

Copy link

github-actions bot commented Jan 2, 2024

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.11% 0% 0% 4.11%
src/Printers/Languages/EplPrinterCommandSet.ts 12.07% 12.86% 11.11% 12.57%
src/Printers/Models/PrinterModelDb.ts 10% 0% 0% 10%
src/Printers/Models/EplPrinterModels.ts 11.76% 100% 0% 11.76%
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 c02a9b3 into main Jan 2, 2024
2 checks passed
@Cellivar Cellivar deleted the unconfigured_device branch January 2, 2024 05:43
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.

2 participants