mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
Added support for Code 39
This commit is contained in:
parent
76cfe7fece
commit
d419e18732
|
|
@ -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…
Reference in New Issue
Block a user