Fix mt8176 reconnect

This commit is contained in:
Bjoern Kerler 2023-04-14 15:27:04 +02:00
parent ad20253b97
commit a3466d3bf3
No known key found for this signature in database
GPG key ID: 52E823BB96A55380
2 changed files with 2 additions and 2 deletions

View file

@ -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")

View file

@ -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)