mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-25 02:30:09 +08:00
Fix: Remove nonsense multiplier
This commit is contained in:
@@ -86,7 +86,7 @@ class GlobeCamera(GlobeOperation, ZoneManager):
|
|||||||
bool: if camera moved.
|
bool: if camera moved.
|
||||||
"""
|
"""
|
||||||
name = 'GLOBE_SWIPE_' + '_'.join([str(int(round(x))) for x in vector])
|
name = 'GLOBE_SWIPE_' + '_'.join([str(int(round(x))) for x in vector])
|
||||||
if np.any(np.abs(vector) > 25):
|
if np.linalg.norm(vector) > 25:
|
||||||
if self.config.DEVICE_CONTROL_METHOD == 'minitouch':
|
if self.config.DEVICE_CONTROL_METHOD == 'minitouch':
|
||||||
distance = self.config.MAP_SWIPE_MULTIPLY_MINITOUCH
|
distance = self.config.MAP_SWIPE_MULTIPLY_MINITOUCH
|
||||||
elif self.config.DEVICE_CONTROL_METHOD == 'MaaTouch':
|
elif self.config.DEVICE_CONTROL_METHOD == 'MaaTouch':
|
||||||
@@ -100,6 +100,8 @@ class GlobeCamera(GlobeOperation, ZoneManager):
|
|||||||
self.device.sleep(0.3)
|
self.device.sleep(0.3)
|
||||||
|
|
||||||
self.globe_update()
|
self.globe_update()
|
||||||
|
else:
|
||||||
|
logger.warning(f'Globe swipe to short: {vector}, dropped')
|
||||||
|
|
||||||
def globe_wait_until_stable(self):
|
def globe_wait_until_stable(self):
|
||||||
prev = self.globe_camera
|
prev = self.globe_camera
|
||||||
@@ -164,8 +166,7 @@ class GlobeCamera(GlobeOperation, ZoneManager):
|
|||||||
area = (400, 200, GLOBE_MAP_SHAPE[0] - 400, GLOBE_MAP_SHAPE[1] - 250)
|
area = (400, 200, GLOBE_MAP_SHAPE[0] - 400, GLOBE_MAP_SHAPE[1] - 250)
|
||||||
loca = point_limit(zone.location, area=area)
|
loca = point_limit(zone.location, area=area)
|
||||||
vector = np.array(loca) - self.globe_camera
|
vector = np.array(loca) - self.globe_camera
|
||||||
# TODO: Yeah, 0.8 multiplier is shit, better implement needed
|
vector = vector / self.config.OS_GLOBE_SWIPE_MULTIPLY
|
||||||
vector = vector * 0.8 / self.config.OS_GLOBE_SWIPE_MULTIPLY
|
|
||||||
swipe = tuple(np.min([np.abs(vector), swipe_limit], axis=0) * np.sign(vector))
|
swipe = tuple(np.min([np.abs(vector), swipe_limit], axis=0) * np.sign(vector))
|
||||||
self.globe_swipe(swipe)
|
self.globe_swipe(swipe)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user