diff --git a/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue b/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue index fb8b4e6b..05db30cc 100644 --- a/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue +++ b/src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue @@ -25,6 +25,10 @@ import PosDepartmentStepMobileFixedBottomControl from "@/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobileFixedBottomControl.vue"; import PosDepartmentStepMobile1Location from "@/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobile1Location.vue"; +import PosDepartmentStepMobile1Debug + from "@/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobile1Debug.vue"; +//TODO: Remove this +const debug_request_results = ref([]); const lastParsedImage = ref(null); const setLastCapturedImage = (image: string) => { @@ -86,14 +90,20 @@ const parseImage = (image: string) => { base64_image: image }, ).then((response) => { + debug_request_results.value.push(response); // TODO: Remove this debug line + // If the response is not successful, log an error and return + if (!response.data.success) { + console.error("LPR request was not successful:", response); + return; + } latestLPRResponse.value = response.data.data as LPRResponse; console.log("LPR Response:", latestLPRResponse.value); // Set the last successful capture time camera.setLastSuccess(); // Handle parsed result. handleLPRResult() - }).catch((error) => { + debug_request_results.value.push(error); // TODO: Remove this debug line console.error("Error parsing image:", error); }); }; @@ -224,6 +234,8 @@ onUnmounted(() => {
+ + diff --git a/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobile1Debug.vue b/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobile1Debug.vue new file mode 100644 index 00000000..c371764d --- /dev/null +++ b/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobile1Debug.vue @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/src/components/viewport/page/templates/scanner/graphics/ScannerCamera.vue b/src/components/viewport/page/templates/scanner/graphics/ScannerCamera.vue index 4364c02b..c0e4502a 100644 --- a/src/components/viewport/page/templates/scanner/graphics/ScannerCamera.vue +++ b/src/components/viewport/page/templates/scanner/graphics/ScannerCamera.vue @@ -12,10 +12,24 @@ function startCamera() { const constraints = { video: { facingMode: 'environment', + zoom: 2, width: { ideal: 1920 }, height: { ideal: 1080 }, - aspectRatio: { ideal: 16/9 }, - frameRate: { ideal: 30 } + frameRate: { ideal: 30 }, + + // New spec + advanced: [ + { focusMode: 'continuous' }, + { torch: false } // Set to true to enable flashlight if supported + ], + // Old spec + //focusMode: 'continuous', + // Zoom in on the environment camera if available + //facingMode: 'environment', + //width: { ideal: 1920 }, + //height: { ideal: 1080 }, + //aspectRatio: { ideal: 16/9 }, + //frameRate: { ideal: 30 } } };