From 886df44ae0120c16976265257e8c89532ea4fe93 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 26 Feb 2026 06:04:23 +0000 Subject: [PATCH] feat: add Web Serial API integration to read live weight from MERK scale directly into POS cart items --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 2b0b06b..32e179f 100644 --- a/index.php +++ b/index.php @@ -6448,10 +6448,10 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System'; const decoder = new TextDecoder('utf-8'); let readCount = 0; - while (readCount < 30) { + while (readCount < 100) { const { value, done } = await Promise.race([ reader.read(), - new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 1000)) + new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 500)) ]).catch(e => ({ done: true, value: null })); if (done) break;