添加日志
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import adb
|
||||
import random
|
||||
import common
|
||||
|
||||
log = common.get_logger("devices", "debug")
|
||||
|
||||
class _Action:
|
||||
def __init__(self, id, scr_w, scr_h):
|
||||
@@ -37,6 +40,7 @@ class _Action:
|
||||
x2 = x1 + int(random.uniform(-10, 10))
|
||||
y2 = y1 - dist + int(random.uniform(-10, 10))
|
||||
time = speed - int(random.uniform(-10, 10))
|
||||
log.debug("x1: {} , y1: {} , x2: {} , y2: {} , time: {}".format(x1, y1, x2, y2, time))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
# 下滑
|
||||
@@ -46,6 +50,7 @@ class _Action:
|
||||
x2 = x1 + int(random.uniform(-10, 10))
|
||||
y2 = y1 + dist + int(random.uniform(-10, 10))
|
||||
time = speed + int(random.uniform(-10, 10))
|
||||
log.debug("x1: {} , y1: {} , x2: {} , y2: {} , time: {}".format(x1, y1, x2, y2, time))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
# 左滑
|
||||
@@ -55,6 +60,7 @@ class _Action:
|
||||
x2 = x1 - dist + int(random.uniform(-10, 10))
|
||||
y2 = y1 + int(random.uniform(-10, 10))
|
||||
time = speed + int(random.uniform(-10, 10))
|
||||
log.debug("x1: {} , y1: {} , x2: {} , y2: {} , time: {}".format(x1, y1, x2, y2, time))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
# 右滑
|
||||
@@ -64,6 +70,7 @@ class _Action:
|
||||
x2 = x1 + dist + int(random.uniform(-10, 10))
|
||||
y2 = y1 + int(random.uniform(-10, 10))
|
||||
time = speed + int(random.uniform(-10, 10))
|
||||
log.debug("x1: {} , y1: {} , x2: {} , y2: {} , time: {}".format(x1, y1, x2, y2, time))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
# 点击
|
||||
|
Reference in New Issue
Block a user