fix(task): 修复某些情况下竞赛时会卡在 SKIP 按钮上

This commit is contained in:
XcantloadX 2025-03-17 12:47:16 +08:00
parent 8356fa1c52
commit 69a59879ff
1 changed files with 1 additions and 2 deletions

View File

@ -92,8 +92,7 @@ def pick_and_contest(has_ongoing_contest: bool = False) -> bool:
# 点击 SKIP
sleep(3)
logger.debug('Clicking on SKIP.')
# TODO: 改为二值化图片
device.click(image.expect(R.Daily.ButtonIconSkip, colored=True, transparent=True, threshold=0.999))
device.click(image.expect(R.Daily.ButtonIconSkip, preprocessors=[WhiteFilter()]))
while not image.wait_for(R.Common.ButtonNextNoIcon, timeout=2):
device.click_center()
logger.debug('Waiting for the result.')