mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 19:25:05 -05:00
Fix mt8176 reconnect
This commit is contained in:
parent
ad20253b97
commit
a3466d3bf3
2 changed files with 2 additions and 2 deletions
|
@ -1111,7 +1111,7 @@ class DALegacy(metaclass=LogBase):
|
|||
if speed[0] == 0: # 1 = USB High Speed, 2= USB Ultra high speed
|
||||
self.info("Reconnecting to preloader")
|
||||
self.set_usb_cmd()
|
||||
self.mtk.port.close(reset=False)
|
||||
self.mtk.port.close(reset=True)
|
||||
time.sleep(1)
|
||||
while not self.mtk.port.cdc.connect():
|
||||
self.info("Waiting for reconnection")
|
||||
|
|
|
@ -1155,7 +1155,7 @@ class DAXFlash(metaclass=LogBase):
|
|||
self.info("Reconnecting to preloader")
|
||||
self.config.set_gui_status(self.config.tr("Reconnecting to preloader"))
|
||||
self.set_usb_speed()
|
||||
self.mtk.port.close(reset=False)
|
||||
self.mtk.port.close(reset=True)
|
||||
time.sleep(2)
|
||||
while not self.mtk.port.cdc.connect():
|
||||
time.sleep(0.5)
|
||||
|
|
Loading…
Reference in a new issue