Skip to content

Commit

Permalink
fix:修复拖拽功能在有空位时出现bug的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Ks-luow committed Apr 15, 2023
1 parent 72623b8 commit 66fc96f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def drone(self, room: str, not_customize=False, not_return=False):
int(self.recog.w * 1150 / 1920), int(self.recog.h * 35 / 1080), int(self.recog.w * 1295 / 1920),
int(self.recog.h * 72 / 1080)), limit=201)
logger.info(f'当前无人机数量为:{drone_count}')
if drone_count< self.drone_count_limit :
if drone_count< self.drone_count_limit or drone_count == 201:
logger.info(f"无人机数量小于{self.drone_count_limit}->停止")
return
logger.info('制造站加速')
Expand Down Expand Up @@ -1096,12 +1096,12 @@ def drone(self, room: str, not_customize=False, not_return=False):
if not_customize:
drone_count = self.read_screen(self.recog.img, type='drone_mood', cord=(
int(self.recog.w * 1150 / 1920), int(self.recog.h * 35 / 1080), int(self.recog.w * 1295 / 1920),
int(self.recog.h * 72 / 1080)), limit=200)
int(self.recog.h * 72 / 1080)), limit=201)
logger.info(f'当前无人机数量为:{drone_count}')
self.recog.update()
self.recog.save_screencap('run_order')
# 200 为识别错误
if drone_count < self.drone_count_limit:
if drone_count < self.drone_count_limit or drone_count == 201:
logger.info(f"无人机数量小于{self.drone_count_limit}->停止")
break
st = accelerate[1] # 起点
Expand Down
4 changes: 4 additions & 0 deletions menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,12 @@ def swtich_plan(drag_task):
value2 = plan[key2] if key2 in plan else None;
if value1 is not None:
plan[key2] = value1
elif key2 in plan:
plan.pop(key2)
if value2 is not None:
plan[key1] = value2
elif key1 in plan:
plan.pop(key1)
write_plan()
load_plan(conf['planFile'])

Expand Down

0 comments on commit 66fc96f

Please sign in to comment.