Make Quagga2 setting "numOfWorkers" adjustable (closes #713)

This commit is contained in:
Bernd Bestel 2020-04-13 16:14:43 +02:00
parent 45d96cb60f
commit f36d9c46ed
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 6 additions and 2 deletions

View File

@ -41,10 +41,11 @@
### General & other improvements/fixes ### General & other improvements/fixes
- Optimized that sometimes the corresponding form was not validated when selecting a date from the datetimepicker - Optimized that sometimes the corresponding form was not validated when selecting a date from the datetimepicker
- New `config.php` setting `FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD` which activates the number pad for best-before-date fields on (supported) mobile browsers (useful because of [shorthands](https://github.com/grocy/grocy#input-shorthands-for-date-fields)) (defaults to `true`) (thanks @Mik-) - New `config.php` setting `FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD` which activates the number pad for best-before-date fields on (supported) mobile browsers (useful because of [shorthands](https://github.com/grocy/grocy#input-shorthands-for-date-fields)) (defaults to `true`) (thanks @Mik-)
- Enhancements for the camera barcode scanner (thanks @Mik- for the work on improving the torch capabilities) - Enhancements for the camera barcode scanner (thanks @Mik- for the work on improving the torch capabilities & CSS)
- Replaced [QuaggaJS](https://github.com/serratus/quaggaJS) (seems to be unmaintained) by [Quagga2](https://github.com/ericblade/quagga2) - Replaced [QuaggaJS](https://github.com/serratus/quaggaJS) (seems to be unmaintained) by [Quagga2](https://github.com/ericblade/quagga2)
- The light button only displayed when the device has a flash light - The light button only displayed when the device has a flash light
- New `config.php` setting `FEATURE_FLAG_AUTO_TORCH_ON_WITH_CAMERA` to always enable the flash light automatically - New `config.php` setting `FEATURE_FLAG_AUTO_TORCH_ON_WITH_CAMERA` to always enable the flash light automatically
- New user setting `quagga2_numofworkers` (`config.php`) to make the Quagga2 setting "numOfWorkers" adjustable (defaults to `4`)
- Various display/CSS improvements - Various display/CSS improvements
- Prerequisites (PHP extensions, critical files/folders) will now be checked and properly reported if there are problems (thanks @Forceu) - Prerequisites (PHP extensions, critical files/folders) will now be checked and properly reported if there are problems (thanks @Forceu)
- Improved the the overview pages on mobile devices (main column was hidden) (thanks @Mik-) - Improved the the overview pages on mobile devices (main column was hidden) (thanks @Mik-)

View File

@ -125,6 +125,9 @@ 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
DefaultUserSetting('quagga2_numofworkers', 4);
# 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,7 +69,7 @@ Grocy.Components.BarcodeScanner.StartScanning = function()
} }
} }
}, },
numOfWorkers: 2, numOfWorkers: Grocy.UserSettings.quagga2_numofworkers,
frequency: 10, frequency: 10,
decoder: { decoder: {
readers: [ readers: [