mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-24 11:19:03 +08:00
Fix: Add minimum swipe distance in OpSi globe map
This commit is contained in:
@@ -86,7 +86,10 @@ 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.linalg.norm(vector) > 25:
|
if np.linalg.norm(vector) <= 25:
|
||||||
|
logger.warning(f'Globe swipe to short: {vector}')
|
||||||
|
vector = np.sign(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,8 +103,6 @@ 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
|
||||||
|
|||||||
Reference in New Issue
Block a user