luis901101 / honeywell_scanner

BSD 3-Clause "New" or "Revised" License
22 stars 9 forks source link

CK65 - Disabling Physical Scanner? #15

Open aquila-steve opened 1 year ago

aquila-steve commented 1 year ago

The commands to start & stop scanning do not disable the physical scanner on my CK65. Based upon what I can tell, when you stop the scanning, the logic simply does not process the actual value scanned.

This seems like a very non-user friendly, confusing situation. For all practical purposes, the scanner is still functioning, the value is scanned, so it appears to the user that something should happen.

Is there a way the physical hardware can be turned off & on?

luis901101 commented 1 year ago

Start scanning uses property TRIGGER_SCAN_MODE_CONTINUOUS, so what this does is just to start scanning and wait for something to scan. When you use the physical button you override this behavior with a TRIGGER_SCAN_MODE_ONESHOT so the scanner stops continuos scanning and delivers whatever it scanned. If you have some use case in which you need to disable physical scanner button, check the docs referenced in the README.md, BarcodeReaderProperties.java and BarcodeReader.html and search for the property to disable scanning, presumably some TRIGGER_CONTROL_MODE_XXX... anyway search for all the properties having *TRIGGER* and read docs and there should be what you need.

Important: note that all the properties I mentioned above like TRIGGER_SCAN_MODE_CONTINUOUS are really the Android const name for the property... the property value is what you need when using it from dart code... for instance:

    public static final String TRIGGER_SCAN_MODE_CONTINUOUS = "continuous";

What you should use as property name from dart is continuous.

aquila-steve commented 1 year ago

Thank you!

I did scan that document previously and did not see anything that made sense, however I will look again.