mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-02 03:44:08 +08:00
Opt: Reduce config read/write at WSA startup
This commit is contained in:
@@ -50,6 +50,11 @@ class Connection:
|
|||||||
raise RequestHumanTakeover
|
raise RequestHumanTakeover
|
||||||
if "wsa" in self.serial:
|
if "wsa" in self.serial:
|
||||||
self.serial = '127.0.0.1:58526'
|
self.serial = '127.0.0.1:58526'
|
||||||
|
if self.config.Emulator_ScreenshotMethod != 'uiautomator2' \
|
||||||
|
or self.config.Emulator_ControlMethod != 'uiautomator2':
|
||||||
|
with self.config.multi_set():
|
||||||
|
self.config.Emulator_ScreenshotMethod = 'uiautomator2'
|
||||||
|
self.config.Emulator_ControlMethod = 'uiautomator2'
|
||||||
|
|
||||||
logger.attr('Adb_binary', self.adb_binary)
|
logger.attr('Adb_binary', self.adb_binary)
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ class Device(Screenshot, Control, AppControl):
|
|||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
if 'wsa' in self.config.Emulator_Serial:
|
|
||||||
self.config.Emulator_ScreenshotMethod = 'uiautomator2'
|
|
||||||
self.config.Emulator_ControlMethod = 'uiautomator2'
|
|
||||||
self.screenshot_interval_set()
|
self.screenshot_interval_set()
|
||||||
|
|
||||||
def handle_night_commission(self, daily_trigger='21:00', threshold=30):
|
def handle_night_commission(self, daily_trigger='21:00', threshold=30):
|
||||||
|
|||||||
Reference in New Issue
Block a user