| 592 | |
| 593 | |
| 594 | class MyController(CustomController): |
| 595 | |
| 596 | def __init__(self): |
| 597 | super().__init__() |
| 598 | self.count = 0 |
| 599 | |
| 600 | def connect(self) -> bool: |
| 601 | print(" on MyController.connect") |
| 602 | self.count += 1 |
| 603 | return True |
| 604 | |
| 605 | def connected(self) -> bool: |
| 606 | print("on MyController.connected") |
| 607 | return True |
| 608 | |
| 609 | def request_uuid(self) -> str: |
| 610 | print(" on MyController.request_uuid") |
| 611 | return "12345678" |
| 612 | |
| 613 | def start_app(self, intent: str) -> bool: |
| 614 | print(f" on MyController.start_app: {intent}") |
| 615 | self.count += 1 |
| 616 | return True |
| 617 | |
| 618 | def stop_app(self, intent: str) -> bool: |
| 619 | print(f" on MyController.stop_app: {intent}") |
| 620 | self.count += 1 |
| 621 | return True |
| 622 | |
| 623 | def screencap(self) -> numpy.ndarray: |
| 624 | print(" on MyController.screencap") |
| 625 | self.count += 1 |
| 626 | return numpy.zeros((1080, 1920, 3), dtype=numpy.uint8) |
| 627 | |
| 628 | def click(self, x: int, y: int) -> bool: |
| 629 | print(f" on MyController.click: {x}, {y}") |
| 630 | self.count += 1 |
| 631 | return True |
| 632 | |
| 633 | def swipe(self, x1: int, y1: int, x2: int, y2: int, duration: int) -> bool: |
| 634 | print(f" on MyController.swipe: {x1}, {y1} -> {x2}, {y2}, {duration}") |
| 635 | self.count += 1 |
| 636 | return True |
| 637 | |
| 638 | def touch_down(self, contact: int, x: int, y: int, pressure: int) -> bool: |
| 639 | print(f" on MyController.touch_down: {contact}, {x}, {y}") |
| 640 | self.count += 1 |
| 641 | return True |
| 642 | |
| 643 | def touch_move(self, contact: int, x: int, y: int, pressure: int) -> bool: |
| 644 | print(f" on MyController.touch_move: {contact}, {x}, {y}") |
| 645 | self.count += 1 |
| 646 | return True |
| 647 | |
| 648 | def touch_up(self, contact: int) -> bool: |
| 649 | print(f" on MyController.touch_up: {contact}") |
| 650 | self.count += 1 |
| 651 | return True |
no outgoing calls