From 0f6dd93608d8242c01cf28e1c898a834c9852b86 Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Sat, 9 Dec 2023 21:22:11 +0800 Subject: [PATCH] fix(sweep): remove index if equal 0 --- tasks/stage/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/stage/list.py b/tasks/stage/list.py index 1cef911..705a6a8 100644 --- a/tasks/stage/list.py +++ b/tasks/stage/list.py @@ -53,7 +53,7 @@ class StageList: def load_stage_indexes(self, main: ModuleBase): self.current_indexes = list( filter( - lambda x: re.match(r'^\d{1,2}-?\d?$', x[0]), + lambda x: re.match(r'^\d{1,2}-?\d?$', x[0]) and x[0] != '00', map(lambda x: (x.ocr_text, x.box), self.index_ocr.detect_and_ocr(main.device.image)) ) )