Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在选择比赛的时候滑动事件会变成点击事件 #71

Closed
NateScarlet opened this issue Jun 20, 2021 · 11 comments
Closed

在选择比赛的时候滑动事件会变成点击事件 #71

NateScarlet opened this issue Jun 20, 2021 · 11 comments
Labels
bug Something isn't working

Comments

@NateScarlet
Copy link
Owner

报告一个新bug
在选择比赛的时候滑动事件会变成点击事件。log如下:
auto_derby.log
手动adb执行adb shell input swipe 232 1391 232 1353 200同样为点击,应该不是触摸时间或者延迟的问题吧。
感觉依旧是超出了屏幕的最大值

Originally posted by @fatinghenji in #69 (comment)

@NateScarlet
Copy link
Owner Author

这个坐标在1080x1920的范围内 可能200毫秒算作了点击

@fatinghenji
Copy link

我去调整下时间试试

@fatinghenji
Copy link

不是时间的问题,是滑动距离的问题。
1391和1353太近了,被识别成点击了
adb shell input swipe 232 1391 232 1285 200这个可以正常滑动。

@NateScarlet NateScarlet added the bug Something isn't working label Jun 20, 2021
@fatinghenji
Copy link

需要我改动哪里的代码才可以正常使用呢?

@Small-Ku
Copy link
Contributor

我猜是dy的部分?

action.drag(
rp.vector2((100, 600), 466),
dy=rp.vector(-50, 466),
duration=0.2,
)

@fatinghenji
Copy link

我猜是dy的部分?

action.drag(
rp.vector2((100, 600), 466),
dy=rp.vector(-50, 466),
duration=0.2,
)

没太看懂应该怎么修改

@NateScarlet
Copy link
Owner Author

rp.vector(-50, 466) 代表相对于466宽的屏幕向上滑动50像素

不过不能调太大 一次滑动不能超过一个比赛的高度 不然会漏比赛

@NateScarlet
Copy link
Owner Author

奇怪的是相对466的屏幕都是50像素了 相对于你1080的屏幕为啥会只有40

@NateScarlet
Copy link
Owner Author

你用的是你自己改过的版本? 这里的时长不应该是200毫秒

重置一下试试

@fatinghenji
Copy link

你用的是你自己改过的版本?

应该不是吧……我也说不好。

重置一下试试

下载了最新的版本,在跑了,看看还有没有问题。

NateScarlet added a commit that referenced this issue Jun 21, 2021
@NateScarlet
Copy link
Owner Author

我的也出现了 但是坐标是对的

DEBUG [2021-06-22 03:42:16]:auto_derby.clients.adb:114: drag: input swipe 366 1390 366 1622 100

我加大时长看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants