1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 11:15:13 +00:00

fix(sweep): remove index if equal 0

This commit is contained in:
YoursFunny 2023-12-09 21:22:11 +08:00
parent f5cf0a7fbe
commit 0f6dd93608
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C

View File

@ -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))
)
)