Skip to content

Commit

Permalink
Update Baas_thread.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pur1fying committed Feb 18, 2024
1 parent 6e5de60 commit 7f0b048
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/Baas_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ def _init_emulator(self) -> bool:
self.connection = u2.connect(f'127.0.0.1:{self.adb_port}')
if 'com.github.uiautomator' not in self.connection.app_list():
self.connection.app_install('ATX.apk')
self.connection.uiautomator.start()
time.sleep(2)
self.latest_img_array = self.get_screenshot_array()
self.first_start_u2 = False
self.last_start_u2_time = time.time()
self.latest_img_array = self.get_screenshot_array()
temp = self.connection.window_size()
self.logger.info("Screen Size " + str(temp)) # 判断分辨率是否为1280x720
width = max(temp[0], temp[1])
Expand Down

0 comments on commit 7f0b048

Please sign in to comment.