From 298a5e32327ff2b2ff905e16b2c6150960cee77a Mon Sep 17 00:00:00 2001 From: Zebartin <16185081+Zebartin@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:39:13 +0800 Subject: [PATCH] Opt: Locked checking --- assets/cn/assignment/ui/LOCKED.png | Bin 0 -> 8645 bytes assets/en/assignment/ui/LOCKED.png | Bin 0 -> 10145 bytes .../assignment/assets/assets_assignment_ui.py | 17 +++++++++++++++++ tasks/assignment/ui.py | 5 ++++- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 assets/cn/assignment/ui/LOCKED.png create mode 100644 assets/en/assignment/ui/LOCKED.png diff --git a/assets/cn/assignment/ui/LOCKED.png b/assets/cn/assignment/ui/LOCKED.png new file mode 100644 index 0000000000000000000000000000000000000000..7b7d7c4b7af19ae3dce5fad8ed9405936d2a064d GIT binary patch literal 8645 zcmeHMZCH}ox_-09thU)qd&W}JX4lTWcOP1YmV``SI$fDsrsfwq<7~fBa8gh~C2LpH zDRrzpnK)`?iHd-RfT2K5joL210>nT-Wzqx@kpKbVJvei&^Z)!hfBf-Y_gX*J^{)3> z&wD@jbFUi_VIj`z-PQvD;C$-q6XyWn6Z_C%$jQ+TgT>NlJFLn*7jg`s4tUJiC#!Rh zojUL2;#AB&-ZUx-P4nN%=d4OJNJF&v~$zf$F~3Q=%)@bY~Ukz5f3 zE4pb#Bd$p4m9}A}MOx`3|DU?%toz_SnD#ROxTm6WCtpAg5D@)&T@c@cA7wrt=|Xj0 zW=?vWW9r(>`=)Q?Z{B2qx>BMV?17{69tCnxmMtE$U@I7_dtYt4e*DT6$RXcRuGhV7 zEeLQ-H&rIcBN3MJSUtVdQ6v!80n)3d;-m5B3k0h!Q!EfzKY?n}#r=;_8j~5$s0fN7i_B2&aOt@|FXliZ_)8pvbi_jp5 zw1l*dz?lnm{?ozIw!aszh7e@w?h8|8<;*X0tR{D*5w&!#Hdn?r+?&$V<2YH&^TqiscO- z0eeW9{X_->^Ewi8=umK9n3_W+Br8p8)V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L3w79noJM8S+dD@|=n;w&uO)K40+83efuyFQ2Bn7rBc#h!$S(|7k#CMG7ZJCj)= z=zcv5EM!TLnnA#RT=>~PXg^of+IrPqh(qkWip!PPncszbHJNnNMz0jiAiRincMpu> zoOkAjt`85-V4k0JN4{u0o%!naV~7AWv2#T%s0Gn6aU0t)Uappihw=UYmX*2kXag6x z59`EBH{-ZP|AfA!#Rkle^SUK-yNaG)bypQ@z~rvi^JY60LD9UZUQ#)0|AJl$RrS4m zU^wEV!6{z$+o|jFAJnx$M5FM-lcK9i#-I5A2evd6o+)MLssxc$f?5_>FYcJRO@#YL zgNwR)p~1C|GR+L)6S6Y$ZHa9;XRS*UYgIEOf6-}4JXv7ld z`}*eb`Rjoil5s`>>L8Xjwot16G{sudMD{~v|=`3Kh*E75HAhr0FTfG zhae~WD&5>X7Nh#yJ-1St75$AK-q;POMujKrVn=ZBG^62TSZrt8#_(miBbl>7hv2FA zMWNd~n^NxZAx8uRIYF9kgXR7j%gEQv`ET*(->UiXP+-xw|4O2P)>N4`%de%4@Z6+O zK=$t+Mi{x*>(VP$0aK1Ue%C(-Ado~3inPnSf}ur!CrgKxvEJQk@PkQ%*5dKXRl0j!lw`zK{y0YSYG!8M_8Qed~Yj5|{gem7B(u qTUC1!tT<*Xj@kdoF(WHMhsipX=c(dt@9p^moH`kHf_g0Z@_z&L2w=eg literal 0 HcmV?d00001 diff --git a/assets/en/assignment/ui/LOCKED.png b/assets/en/assignment/ui/LOCKED.png new file mode 100644 index 0000000000000000000000000000000000000000..fd916b3374dec7bb10fad9a43d98233e55638e81 GIT binary patch literal 10145 zcmeHNXTsnls2wcM!dz0-`A%v3I=Ld%pbla7^|E2R}GA{I(2A}u$)EozO| zoXON%j+!E($)bXgI!0Q8OM-%cOKvEjBA|e9@jjpXynkLjZ+!9poO53MKL6k6tlx9a z@4+wreiobUHUj_vi_@omIu8JBGO`*Tf1M06dP3IOccbNZ*F7gM98!lC>L z7*@PcS=cW;PR{ zy_5X^>YBH-!!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YQ~A9SEbjW0A}H6RE#Dpj_kA|NxGfQpJDBtokKPWNLg`{Qs5FI9 zGBm$FCV&bwOt-4KiMX`J#b#DH+TRcgIP&ePBkaMd!Im=M|TVfzr)?FK-iNbjf|T zayRUPaXtC(-laoWd_EhkAP|wZQOT#plV)N=BIINTL!2>%;lDhdEg0ZMiACzS5F<8r z#r{=XW@RAZ2u#CgKPy$>1B{AZAwW=(9TE$j_{1&6%_WP=BST$WC4BCsCulfG1Je`A;>do~3T9ugsW6i99vPX9!7*mV- zhUp8BJw5qbI6yhi0`NdGx)XQMU;_Xwr`%euZowXXJkWc_TR(R|I(8N`vrRUvU?W2u zy#_5Ku?X7SB9Bzi8}FSWDNy|$V5}7rGf>L?@^VUDOOHy*tafB*o`aiZ_E7Da@YgRf z0s#VnAehlVxY6h>sf#~h=7E_#{Uej9Wx^X%LhQo@J>GIDYI&(YfRw){z;eomC>=tb zpe1lh(9#r7l6}-I6m9y|qx2)XSq_fk=(`wemDE6p6YF(C+pPkq$gL?kfHwNBh@V5G zT^rQ@nkiN482KQ2kDsSZKxI1mB%dn<>paDp^t@;8UJHLJK%_Om6fh-pKvH4?e1~kZ ztt=hr>4SO+dNfHkTg$8$E@;HDp5k;2En3bPwY1@TGBo9?kM(;5&VHpb$Z^0a=l=k1 zyed*OE>6I3ujj{k-~9X(ts8=AV;jK+DuSB7Cn^@QtiQ#FK@^?nv6U$SSA`b%G>Ad~ zQIVliP7g-kR7&0Bgdu^tdP{pfeoX5)tP?>dY<{rP6fk}}Hv>ARehHxx`RqYj4W<6Wt@`K9y*UE6|`|%2Z>619U z*!Z}`Xsf;q9b}F9YOMiYe?VeX!TN4&eK)qg8~Z=)#)9DntNNb~ZU6mc@|m?{a{7e- KPqoJ`-~BgZ+^iG; literal 0 HcmV?d00001 diff --git a/tasks/assignment/assets/assets_assignment_ui.py b/tasks/assignment/assets/assets_assignment_ui.py index 4f0adf42a..230772f3d 100644 --- a/tasks/assignment/assets/assets_assignment_ui.py +++ b/tasks/assignment/assets/assets_assignment_ui.py @@ -108,6 +108,23 @@ GROUP_SEARCH = ButtonWrapper( 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( name='OCR_ASSIGNMENT_ENTRY_LIST', share=Button( diff --git a/tasks/assignment/ui.py b/tasks/assignment/ui.py index c69095c6a..f46fa5ae4 100644 --- a/tasks/assignment/ui.py +++ b/tasks/assignment/ui.py @@ -224,7 +224,7 @@ class AssignmentUI(UI): self.device.screenshot() if timeout.reached(): - logger.info( + logger.warning( 'Check assignment status timeout, assume LOCKED' ) break @@ -237,6 +237,9 @@ class AssignmentUI(UI): if self.appear(EMPTY_SLOT): ret = AssignmentStatus.DISPATCHABLE break + if self.appear(LOCKED): + ret = AssignmentStatus.LOCKED + break logger.attr('AssignmentStatus', ret.name) return ret