fix(task): 修复某些情况下竞赛时会卡在 SKIP 按钮上
This commit is contained in:
parent
8356fa1c52
commit
69a59879ff
|
@ -92,8 +92,7 @@ def pick_and_contest(has_ongoing_contest: bool = False) -> bool:
|
||||||
# 点击 SKIP
|
# 点击 SKIP
|
||||||
sleep(3)
|
sleep(3)
|
||||||
logger.debug('Clicking on SKIP.')
|
logger.debug('Clicking on SKIP.')
|
||||||
# TODO: 改为二值化图片
|
device.click(image.expect(R.Daily.ButtonIconSkip, preprocessors=[WhiteFilter()]))
|
||||||
device.click(image.expect(R.Daily.ButtonIconSkip, colored=True, transparent=True, threshold=0.999))
|
|
||||||
while not image.wait_for(R.Common.ButtonNextNoIcon, timeout=2):
|
while not image.wait_for(R.Common.ButtonNextNoIcon, timeout=2):
|
||||||
device.click_center()
|
device.click_center()
|
||||||
logger.debug('Waiting for the result.')
|
logger.debug('Waiting for the result.')
|
||||||
|
|
Loading…
Reference in New Issue