feat: enhance swipe and back navigation logic
- Adjusted configuration for reset after swipes to 10 seconds and added action to go back. - Updated flow control to skip back action if a recent reset was triggered within 5 seconds. - Implemented a mechanism to enable back navigation when consecutive misses reach a threshold. - Added GUI options to enable or disable back navigation on misses, ensuring consistency with user settings. - Introduced new diagnostic tools for runtime flag checks and screenshot diagnostics. - Created PowerShell scripts for restoring Start Menu shortcuts and performing system health checks. - Added tests for swipe operations and back navigation to validate new logic.
This commit is contained in:
1 parent
0c3a763d63
commit
dcded08796
19 files changed
+936
-22
No files matched your search
@@ -0,0 +1,23 @@
|
||||
from douyin.handlers import douyin_swipe_ops
|
||||
from douyin.core.douyin_fudai import fudai_analyse
|
||||
|
||||
class DummyOp:
|
||||
def _adb(self):
|
||||
# Return path to non-existing adb to force fallback
|
||||
return "adb"
|
||||
def swipe(self, device_id, sx, sy, ex, ey, duration_ms):
|
||||
print(f"DummyOp.swipe called device={device_id} from ({sx},{sy}) to ({ex},{ey}) duration={duration_ms}")
|
||||
|
||||
|
||||
def simulate_once(i:int):
|
||||
a = fudai_analyse()
|
||||
a.operation = DummyOp()
|
||||
a.device_id = f"DUMMY{i}"
|
||||
a.resolution_ratio_x = 1080
|
||||
a.resolution_ratio_y = 2400
|
||||
print(f"--- simulate swipe #{i} ---")
|
||||
douyin_swipe_ops.swipe_up_switch_live(a)
|
||||
|
||||
if __name__ == '__main__':
|
||||
for i in range(1, 11):
|
||||
simulate_once(i)
|
||||
Reference in new issue
Block a user