This commit is contained in:
parent
c86e7ac651
commit
345ec6e2c5
1 changed files with 4 additions and 2 deletions
|
@ -98,10 +98,12 @@ class EnterRoomSolver(BaseSolver, BaseMixin):
|
||||||
logger.info(f"{translate_room(room)}")
|
logger.info(f"{translate_room(room)}")
|
||||||
self.room = room
|
self.room = room
|
||||||
self.detail = detail
|
self.detail = detail
|
||||||
self.avoid_bug_start_time = datetime.now()
|
self.avoid_bug_start_time = None
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
def bug_timeout(self) -> bool:
|
def bug_timeout(self) -> bool:
|
||||||
|
if self.avoid_bug_start_time is None:
|
||||||
|
self.avoid_bug_start_time = datetime.now()
|
||||||
return datetime.now() > self.avoid_bug_start_time + timedelta(seconds=60)
|
return datetime.now() > self.avoid_bug_start_time + timedelta(seconds=60)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -127,7 +129,7 @@ class EnterRoomSolver(BaseSolver, BaseMixin):
|
||||||
return
|
return
|
||||||
if self.bug_timeout(): # yj的bug
|
if self.bug_timeout(): # yj的bug
|
||||||
self.back()
|
self.back()
|
||||||
self.avoid_bug_start_time = datetime.now()
|
self.avoid_bug_start_time = None
|
||||||
return
|
return
|
||||||
score, scope = config.recog.match2d("control_central")
|
score, scope = config.recog.match2d("control_central")
|
||||||
if score >= 0.7:
|
if score >= 0.7:
|
||||||
|
|
Loading…
Add table
Reference in a new issue