Skip to content

Commit

Permalink
#56 修复校准使用接待中心
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorReid committed Oct 26, 2023
1 parent 9e21046 commit 2ef6e5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sr/app/calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
from cv2.typing import MatLike

from basic.i18_utils import gt
from basic.img import cv2_utils
from basic.log_utils import log
from sr import constants
Expand Down Expand Up @@ -31,10 +32,10 @@ def run(self):
def _check_mini_map_pos(self, screenshot: MatLike = None):
log.info('[小地图定位校准] 开始')
if screenshot is None:
tp: TransportPoint = constants.map.P01_R04_SP03
tp: TransportPoint = constants.map.P01_R02_SP02
op = Transport(self.ctx, tp, True)
if not op.execute():
log.error('传送到支援舱段失败 小地图定位校准 失败')
log.error('传送到 %s %s 失败 小地图定位校准 失败', gt(tp.region.cn), gt(tp.cn))
return False

screenshot = self.screenshot()
Expand Down Expand Up @@ -63,7 +64,7 @@ def _check_turning_rate(self, tp: bool = True):
p: TransportPoint = constants.map.P01_R01_SP03
op = Transport(self.ctx, p, False)
if not op.execute():
log.error('传送到黑塔办公室失败 转向校准 失败')
log.error('传送到 %s %s 失败 转向校准 失败', gt(p.region.cn), gt(p.cn))
return False
turn_distance = 500

Expand Down

0 comments on commit 2ef6e5e

Please sign in to comment.