调整日志

This commit is contained in:
2025-09-16 21:33:44 +08:00
parent c29a663300
commit daa6345c15
3 changed files with 20 additions and 23 deletions

View File

@@ -182,22 +182,8 @@ class ControlUtils(object):
# 点击一个随机范围
@classmethod
def tap_mini_cluster(cls, center_x: int, center_y: int, session, points=5, duration_ms=60):
"""
以 (center_x, center_y) 为中心,在 3×3 像素范围内摆 `points` 个邻近坐标,
一次性同时按下,持续 `duration_ms` 后抬起。
"""
# 1. 生成邻像素坐标±1 像素内)
cluster = []
for i in range(points):
dx = random.randint(-1, 1)
dy = random.randint(-1, 1)
cluster.append((center_x + dx, center_y + dy))
pass
# 2. 随机持续时间 50100 ms
duration_s = random.randint(50, 100) / 1000.0
# 3. 下发多点触控
session.tap_hold_coords(cluster, duration=duration_s)
# 检测五分钟前和当前的状态是否相同
# @classmethod
# def compareCurrentWithPreviousState(cls,xml):