9 |
9 |
10 import os |
10 import os |
11 import shutil |
11 import shutil |
12 import contextlib |
12 import contextlib |
13 |
13 |
14 from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication, QThread, QEventLoop |
14 from PyQt6.QtCore import pyqtSlot, Qt, QCoreApplication, QThread, QEventLoop |
15 from PyQt5.QtWidgets import QDialog |
15 from PyQt6.QtWidgets import QDialog |
16 |
16 |
17 from E5Gui.E5PathPicker import E5PathPickerModes |
17 from E5Gui.E5PathPicker import E5PathPickerModes |
18 |
18 |
19 from .Ui_UF2FlashDialog import Ui_UF2FlashDialog |
19 from .Ui_UF2FlashDialog import Ui_UF2FlashDialog |
20 |
20 |
451 @type str |
451 @type str |
452 @return list of tuples with the board type, the port description, the |
452 @return list of tuples with the board type, the port description, the |
453 VID and PID |
453 VID and PID |
454 @rtype list of tuple of (str, str, int, int) |
454 @rtype list of tuple of (str, str, int, int) |
455 """ |
455 """ |
456 from PyQt5.QtSerialPort import QSerialPortInfo |
456 from PyQt6.QtSerialPort import QSerialPortInfo |
457 |
457 |
458 foundDevices = [] |
458 foundDevices = [] |
459 |
459 |
460 availablePorts = QSerialPortInfo.availablePorts() |
460 availablePorts = QSerialPortInfo.availablePorts() |
461 for port in availablePorts: |
461 for port in availablePorts: |