From 86139e9b0f8e4c17f19935cb49c94b11b2c91575 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Fri, 13 Oct 2023 17:49:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99read=5Fscreen=E4=BC=A0=E5=85=A5?= =?UTF-8?q?=E5=BD=A9=E8=89=B2=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index 948fef035..9b84050c3 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -963,7 +963,7 @@ def read_time(self, cord, upperlimit, error_count=0, use_digit_reader=False): if use_digit_reader: time_str = self.digit_reader.get_time(self.recog.gray) else: - time_str = self.read_screen(self.recog.gray, type='time', cord=cord) + time_str = self.read_screen(self.recog.img, type='time', cord=cord) try: h, m, s = str(time_str).split(':') if int(m) > 60 or int(s) > 60: @@ -1837,7 +1837,7 @@ def get_agent_from_room(self, room, read_time_index=None): if room == 'meeting': time.sleep(3) self.recog.update() - clue_res = self.read_screen(self.recog.gray, limit=10, cord=(645, 977, 755, 1018)) + clue_res = self.read_screen(self.recog.img, limit=10, cord=(645, 977, 755, 1018)) if clue_res != 11: self.clue_count = clue_res logger.info(f'当前拥有线索数量为{self.clue_count}') @@ -1865,7 +1865,7 @@ def get_agent_from_room(self, room, read_time_index=None): interval=1, rebuild=True) swiped = True data = {} - _name = self.read_screen(self.recog.gray[name_p[i][0][1]:name_p[i][1][1], name_p[i][0][0]:name_p[i][1][0]], + _name = self.read_screen(self.recog.img[name_p[i][0][1]:name_p[i][1][1], name_p[i][0][0]:name_p[i][1][0]], type="name") error_count = 0 while i >= 3 and _name != '' and ( @@ -1874,7 +1874,7 @@ def get_agent_from_room(self, room, read_time_index=None): self.swipe((self.recog.w * 0.8, self.recog.h * 0.5), (0, -self.recog.h * 0.45), duration=500, interval=1, rebuild=True) _name = self.read_screen( - self.recog.gray[name_p[i][0][1]:name_p[i][1][1], name_p[i][0][0]:name_p[i][1][0]], type="name") + self.recog.img[name_p[i][0][1]:name_p[i][1][1], name_p[i][0][0]:name_p[i][1][0]], type="name") error_count += 1 if error_count > 1: raise Exception("超过出错上限")