0
0
mirror of https://github.com/ok-oldking/ok-wuthering-waves.git synced 2025-04-24 08:25:16 +00:00

调整debug模式截图

This commit is contained in:
firedcto@gmail.com 2025-04-10 11:38:48 +08:00
parent e308da0c38
commit f447595f58
2 changed files with 9 additions and 10 deletions

View File

@ -25,8 +25,8 @@ class AutoPickTask(TriggerTask, BaseWWTask, FindFeature):
})
def send_fs(self):
if self.debug:
self.screenshot('pick_up', show_box=True)
# if self.debug:
# self.screenshot('pick_up', show_box=True)
self.send_key('f')
self.sleep(0.2)
self.send_key('f')

View File

@ -463,8 +463,8 @@ class BaseWWTask(BaseTask):
def pick_echo(self):
if self.find_f_with_text(target_text=self.absorb_echo_text()):
if self.debug:
self.screenshot('pick_echo')
# if self.debug:
# self.screenshot('pick_echo')
self.send_key('f')
if not self.handle_claim_button():
return True
@ -485,10 +485,9 @@ class BaseWWTask(BaseTask):
if turn:
self.center_camera()
echos = self.find_echo()
if self.debug:
self.draw_boxes('echo', echos)
if echos:
self.screenshot('echo')
if self.debug and i == 0:
# self.draw_boxes('echo', echos)
self.screenshot('yolo_echo_start')
max_echo_count = max(max_echo_count, len(echos))
self.log_debug(f'max_echo_count {max_echo_count}')
if echos:
@ -498,8 +497,8 @@ class BaseWWTask(BaseTask):
color_percent = self.calculate_color_percentage(echo_color, front_box)
self.log_debug(f'pick_echo color_percent:{color_percent}')
if color_percent > color_threshold:
if self.debug:
self.screenshot('echo_color_picked')
# if self.debug:
# self.screenshot('echo_color_picked')
self.log_debug(f'found color_percent {color_percent} > {color_threshold}, walk now')
return self.walk_find_echo(), max_echo_count > 1
if not turn and i==0: