Opt: Locked checking

This commit is contained in:
Zebartin 2023-09-28 21:39:13 +08:00
parent f791265a4b
commit 298a5e3232
4 changed files with 21 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -108,6 +108,23 @@ GROUP_SEARCH = ButtonWrapper(
button=(111, 76, 835, 140), button=(111, 76, 835, 140),
), ),
) )
LOCKED = ButtonWrapper(
name='LOCKED',
cn=Button(
file='./assets/cn/assignment/ui/LOCKED.png',
area=(752, 551, 793, 572),
search=(732, 531, 813, 592),
color=(122, 117, 110),
button=(752, 551, 793, 572),
),
en=Button(
file='./assets/en/assignment/ui/LOCKED.png',
area=(760, 551, 839, 571),
search=(740, 531, 859, 591),
color=(107, 102, 93),
button=(760, 551, 839, 571),
),
)
OCR_ASSIGNMENT_ENTRY_LIST = ButtonWrapper( OCR_ASSIGNMENT_ENTRY_LIST = ButtonWrapper(
name='OCR_ASSIGNMENT_ENTRY_LIST', name='OCR_ASSIGNMENT_ENTRY_LIST',
share=Button( share=Button(

View File

@ -224,7 +224,7 @@ class AssignmentUI(UI):
self.device.screenshot() self.device.screenshot()
if timeout.reached(): if timeout.reached():
logger.info( logger.warning(
'Check assignment status timeout, assume LOCKED' 'Check assignment status timeout, assume LOCKED'
) )
break break
@ -237,6 +237,9 @@ class AssignmentUI(UI):
if self.appear(EMPTY_SLOT): if self.appear(EMPTY_SLOT):
ret = AssignmentStatus.DISPATCHABLE ret = AssignmentStatus.DISPATCHABLE
break break
if self.appear(LOCKED):
ret = AssignmentStatus.LOCKED
break
logger.attr('AssignmentStatus', ret.name) logger.attr('AssignmentStatus', ret.name)
return ret return ret