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

Testing barcode scanner serial interface #1801

Closed
wants to merge 1 commit into from

Conversation

andreievg
Copy link
Collaborator

Draft PR trying to use serial interface, using the following configuration for zebra scanner:

Screenshot 2023-05-18 at 5 47 07 PM

it's from our wiki page btw: https://wiki.sussol.net/doku.php/msupply:hardware:barcode_scanner

Building for windows is done with this action (from build test fork):

https://github.com/andreievg/open-msupply-actions-test/blob/develop/.github/workflows/build-test.yaml

@@ -35,6 +38,44 @@ const config: ForgeConfig = {
},
}),
],
hooks: {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is quite something! injecting yarn install into the electron build - quite the trick!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was in a rush so did it that way, potentially there is something else we can do. The problem btw is module not found in built version (but fine when running local dev)

@@ -15,6 +15,9 @@ export const mainConfig: Configuration = {
module: {
rules,
},
externals: {
serialport: 'serialport',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for (const scanner of SUPPORTED_SCANNERS) {
// const productIds = scanner.products.map(p => p.id);
const deviceInfo = devices.find(
d => d.vendorId === scanner.vendorId // &&
d => {
let vendorId = Number('0x' + d.vendorId);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

vendorId is a string of a hex number (without 0x), so for zebra was: 05E0

@github-actions
Copy link

Bundle size difference

Comparing this PR to main

Old size New size Diff
2.93 MB 2.93 MB 0 B (0.00%)

@andreievg
Copy link
Collaborator Author

Added a bit more in the linked issue, closing for now, I think it should be revisited when we do further barcode work/deployments

@andreievg andreievg closed this Jun 21, 2023
@andreievg andreievg deleted the Barcode-scanner-serial-interface branch June 21, 2023 00:40
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.

None yet

2 participants