Skip to content

Commit

Permalink
v5.6 修复呼出地图太卡导致卡死的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYX committed Sep 15, 2023
1 parent 8cfc944 commit 46570ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion states.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,9 @@ def normal(self):
time.sleep(0.3)
self.click((0.1089, 0.0926))
time.sleep(0.3)
tm = time.time()
self.get_screen()
while not self.check("enhance", 0.9208, 0.9380):
while not self.check("enhance", 0.9208, 0.9380) and time.time()-tm<7:
self.click((0.2062, 0.2054))
time.sleep(0.3)
self.get_screen()
Expand Down
17 changes: 10 additions & 7 deletions utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,16 @@ def get_level(self):
time.sleep(1)
self.press("m", 0.2)
time.sleep(2.5)
self.get_screen()
for i in range(12, -1, -1):
if self.check("floor/ff" + str(i + 1), 0.0589, 0.8796):
self.floor = i
log.info(f"当前层数:{i+1}")
self.floor_init = 1
break
tm = time.time()
self.floor_init = 0
while time.time()-tm<5 and not self.floor_init:
self.get_screen()
for i in range(12, -1, -1):
if self.check("floor/ff" + str(i + 1), 0.0589, 0.8796):
self.floor = i
log.info(f"当前层数:{i+1}")
self.floor_init = 1
break
self.press("m", 0.2)
time.sleep(1)

Expand Down

0 comments on commit 46570ec

Please sign in to comment.