Additional configuration options for Quagga2 (#844)

This commit is contained in:
Andre Monteiro 2020-08-19 14:52:04 -03:00 committed by GitHub
parent 2cd3779d82
commit b8cd5cd0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 25 deletions

View File

@ -134,9 +134,14 @@ DefaultUserSetting('auto_reload_on_db_change', true);
# Show a clock in the header next to the logo or not # Show a clock in the header next to the logo or not
DefaultUserSetting('show_clock_in_header', false); DefaultUserSetting('show_clock_in_header', false);
# Component configuration # Component configuration for Quagga2 - read https://github.com/ericblade/quagga2#configobject for details
# Default for Grocy is as below
# For iPhone 7 PLus, halfsample = true, patchsize = small, frequency = 5 yields very good results
DefaultUserSetting('quagga2_numofworkers', 4); DefaultUserSetting('quagga2_numofworkers', 4);
DefaultUserSetting('quagga2_halfsample', false);
DefaultUserSetting('quagga2_patchsize', 'medium');
DefaultUserSetting('quagga2_frequency', 10);
DefaultUserSetting('quagga2_debug', true);
# Feature flags # Feature flags
# grocy was initially about "stock management for your household", many other things # grocy was initially about "stock management for your household", many other things

View File

@ -69,25 +69,25 @@ Grocy.Components.BarcodeScanner.StartScanning = function()
} }
}, },
locator: { locator: {
patchSize: "medium", patchSize: Grocy.UserSettings.quagga2_patchsize,
halfSample: false, halfSample: Grocy.UserSettings.quagga2_halfsample,
debug: { debug: {
showCanvas: true, showCanvas: Grocy.UserSettings.quagga2_debug,
showPatches: true, showPatches: Grocy.UserSettings.quagga2_debug,
showFoundPatches: true, showFoundPatches: Grocy.UserSettings.quagga2_debug,
showSkeleton: true, showSkeleton: Grocy.UserSettings.quagga2_debug,
showLabels: true, showLabels: Grocy.UserSettings.quagga2_debug,
showPatchLabels: true, showPatchLabels: Grocy.UserSettings.quagga2_debug,
showRemainingPatchLabels: true, showRemainingPatchLabels: Grocy.UserSettings.quagga2_debug,
boxFromPatches: { boxFromPatches: {
showTransformed: true, showTransformed: Grocy.UserSettings.quagga2_debug,
showTransformedBox: true, showTransformedBox: Grocy.UserSettings.quagga2_debug,
showBB: true showBB: Grocy.UserSettings.quagga2_debug
} }
} }
}, },
numOfWorkers: Grocy.UserSettings.quagga2_numofworkers, numOfWorkers: Grocy.UserSettings.quagga2_numofworkers,
frequency: 10, frequency: Grocy.UserSettings.quagga2_frequency,
decoder: { decoder: {
readers: [ readers: [
"ean_reader", "ean_reader",
@ -95,17 +95,17 @@ Grocy.Components.BarcodeScanner.StartScanning = function()
"code_128_reader" "code_128_reader"
], ],
debug: { debug: {
showCanvas: true, showCanvas: Grocy.UserSettings.quagga2_debug,
showPatches: true, showPatches: Grocy.UserSettings.quagga2_debug,
showFoundPatches: true, showFoundPatches: Grocy.UserSettings.quagga2_debug,
showSkeleton: true, showSkeleton: Grocy.UserSettings.quagga2_debug,
showLabels: true, showLabels: Grocy.UserSettings.quagga2_debug,
showPatchLabels: true, showPatchLabels: Grocy.UserSettings.quagga2_debug,
showRemainingPatchLabels: true, showRemainingPatchLabels: Grocy.UserSettings.quagga2_debug,
boxFromPatches: { boxFromPatches: {
showTransformed: true, showTransformed: Grocy.UserSettings.quagga2_debug,
showTransformedBox: true, showTransformedBox: Grocy.UserSettings.quagga2_debug,
showBB: true showBB: Grocy.UserSettings.quagga2_debug
} }
} }
}, },