From b60f78f26095ef66e961f35a8600163892c6d702 Mon Sep 17 00:00:00 2001 From: skyflag2022 <107539971+skyflag2022@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:09:57 +0800 Subject: [PATCH] =?UTF-8?q?ocr=E8=8C=83=E5=9B=B4=E4=BF=AE=E6=94=B9=20(#266?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 增加延迟 * 更改OCR范围 * Update main.js --- repo/js/营养袋吃药统计/main.js | 12 ++++++------ repo/js/营养袋吃药统计/manifest.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/repo/js/营养袋吃药统计/main.js b/repo/js/营养袋吃药统计/main.js index d9198daaa..7d7e45e85 100644 --- a/repo/js/营养袋吃药统计/main.js +++ b/repo/js/营养袋吃药统计/main.js @@ -2,10 +2,10 @@ let userName = settings.userName || "默认账户"; const recoveryFoodName = settings.recoveryFoodName || "回血药名字没填"; const resurrectionFoodName = settings.resurrectionFoodName || "复活药名字没填"; const ocrRegion = { - x: 150, - y: 250, - width: 60, - height: 20 + x: 110, + y: 242, + width: 124, + height: 32 }; const loadDelay = +settings.loadDelay || 800; const stepDelay = +settings.stepDelay || 500; @@ -340,7 +340,7 @@ const stepDelay = +settings.stepDelay || 500; // 处理回血药识别结果 if (recoveryNumber === null) { recoveryNumber = 0; - notification.send(`未识别到回血药数量,设置数量为0,药品名:${recoveryFoodName}`) + notification.send(`未识别到回血药数量(数量小于10识别不到),设置数量为0,药品名:${recoveryFoodName}`) await sleep(5000); click(863, 51);//选择食物 await sleep(1000); @@ -360,7 +360,7 @@ const stepDelay = +settings.stepDelay || 500; // 处理复活药识别结果 if (resurrectionNumber === null) { resurrectionNumber = 0; - notification.send(`未识别到复活药数量,设置数量为0,药品名:${resurrectionFoodName}`) + notification.send(`未识别到复活药数量(数量小于10识别不到),设置数量为0,药品名:${resurrectionFoodName}`) await sleep(5000); click(863, 51);//选择食物 await sleep(1000); diff --git a/repo/js/营养袋吃药统计/manifest.json b/repo/js/营养袋吃药统计/manifest.json index 4124f335b..89b694383 100644 --- a/repo/js/营养袋吃药统计/manifest.json +++ b/repo/js/营养袋吃药统计/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "吃药统计", - "version": "1.6", + "version": "1.6.1", "bgi_version": "0.51", "description": "用于统计指定两个食物的消耗,推荐锄地前后使用", "authors": [