9 |
9 |
10 import shutil |
10 import shutil |
11 import os |
11 import os |
12 |
12 |
13 from PyQt5.QtCore import pyqtSlot |
13 from PyQt5.QtCore import pyqtSlot |
14 from PyQt5.QtWidgets import QDialog |
|
15 |
14 |
16 from E5Gui import E5MessageBox, E5FileDialog |
15 from E5Gui import E5MessageBox, E5FileDialog |
17 |
16 |
18 from .MicroPythonDevices import MicroPythonDevice |
17 from .MicroPythonDevices import MicroPythonDevice |
19 from .MicroPythonWidget import HAS_QTCHART |
18 from .MicroPythonWidget import HAS_QTCHART |
26 """ |
25 """ |
27 Class implementing the device for CircuitPython boards. |
26 Class implementing the device for CircuitPython boards. |
28 """ |
27 """ |
29 DeviceVolumeName = "CIRCUITPY" |
28 DeviceVolumeName = "CIRCUITPY" |
30 |
29 |
31 def __init__(self, microPythonWidget, parent=None): |
30 def __init__(self, microPythonWidget, deviceType, parent=None): |
32 """ |
31 """ |
33 Constructor |
32 Constructor |
34 |
33 |
35 @param microPythonWidget reference to the main MicroPython widget |
34 @param microPythonWidget reference to the main MicroPython widget |
36 @type MicroPythonWidget |
35 @type MicroPythonWidget |
|
36 @param deviceType device type assigned to this device interface |
|
37 @type str |
37 @param parent reference to the parent object |
38 @param parent reference to the parent object |
38 @type QObject |
39 @type QObject |
39 """ |
40 """ |
40 super(CircuitPythonDevice, self).__init__(microPythonWidget, parent) |
41 super(CircuitPythonDevice, self).__init__( |
|
42 microPythonWidget, deviceType, parent) |
41 |
43 |
42 self.__workspace = self.__findWorkspace() |
44 self.__workspace = self.__findWorkspace() |
43 |
45 |
44 self.__nonUF2devices = { |
46 self.__nonUF2devices = { |
45 "teensy": self.__flashTeensy, |
47 "teensy": self.__flashTeensy, |