specs: D11.2, Win7, FNC WX v1.5.3.0
Okay. I come to realize that the barcode decoder is working based on a timer of some sort.
But it is interfering with scanning accuracy, causing duplicate scanning, though the barcode will be different due to the "skewing" based on the camera angle and even lighting conditions or package barcode distortion (sometimes the barcode is warped or marred on the package). So, it will give a slightly different barcode for the AResult value.
My solution to this was to somehow pause the decoding process, so I checked to see if there was an event of some sort, but I did not fine one.
So, my second solution was to create a condition to turn on/off using a boolean and test for when I set it to true or false.., thus,
var
OkayToScan: boolean = True; // set to true at app's startup.
Then, in the BarcodeDecoder's onDecoded event, when the AResult has a barcode value:
- I set OkayToScan to False,
- do my routines to test various conditions
- update my db grid
- I set OkayToScan to True again
However, this is not working. I followed as best I could, and concluded that the onDecoded constantly fires about every second, hence my original assumption that it is using a timer of some sort to govern or control it. So basically, the OkayToScan is never set to True.
Is there a way to add a new feature to add an event to allow turning On and Off the "Decoding" routine so that the okayToScan method I am using can work? or maybe it would not be needed if an event were to allow what I'm trying to do to succeed?
I hope the above makes sense. Without this as a feature, this issue will be present during scanning and I would have to implement deleting erroneous entries often.