mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Added support for Code 39 (#1527)
This commit is contained in:
parent
76cfe7fece
commit
416c138017
@ -101,7 +101,8 @@ Grocy.Components.BarcodeScanner.StartScanning = function()
|
|||||||
"ean_reader",
|
"ean_reader",
|
||||||
"ean_8_reader",
|
"ean_8_reader",
|
||||||
"code_128_reader",
|
"code_128_reader",
|
||||||
"datamatrix"
|
"datamatrix",
|
||||||
|
"code_39_reader"
|
||||||
],
|
],
|
||||||
debug: {
|
debug: {
|
||||||
showCanvas: Grocy.UserSettings.quagga2_debug,
|
showCanvas: Grocy.UserSettings.quagga2_debug,
|
||||||
@ -174,7 +175,8 @@ Quagga.onDetected(function(result)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Grocy.Components.BarcodeScanner.DecodedCodesErrorCount / Grocy.Components.BarcodeScanner.DecodedCodesCount < 0.15)
|
if ((Grocy.Components.BarcodeScanner.DecodedCodesErrorCount / Grocy.Components.BarcodeScanner.DecodedCodesCount < 0.15) ||
|
||||||
|
(Grocy.Components.BarcodeScanner.DecodedCodesErrorCount == 0 && Grocy.Components.BarcodeScanner.DecodedCodesCount == 0 && result.codeResult.code.length != 0))
|
||||||
{
|
{
|
||||||
Grocy.Components.BarcodeScanner.StopScanning();
|
Grocy.Components.BarcodeScanner.StopScanning();
|
||||||
$(document).trigger("Grocy.BarcodeScanned", [result.codeResult.code, Grocy.Components.BarcodeScanner.CurrentTarget]);
|
$(document).trigger("Grocy.BarcodeScanned", [result.codeResult.code, Grocy.Components.BarcodeScanner.CurrentTarget]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user