Wed, 30 Aug 2023 16:06:08 +0200
MicroPython
- Corrected an issue in the UF2 Flash Dialog caused by the copied file vanishing before shutil.copy() could copy the mode flags.
8096 | 1 | # -*- coding: utf-8 -*- |
2 | ||
9653
e67609152c5e
Updated copyright for 2023.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9624
diff
changeset
|
3 | # Copyright (c) 2021 - 2023 Detlev Offenbach <detlev@die-offenbachs.de> |
8096 | 4 | # |
5 | ||
6 | """ | |
7 | Module implementing a dialog to flash any UF2 capable device. | |
8 | """ | |
9 | ||
10172 | 10 | import contextlib |
8096 | 11 | import os |
12 | import shutil | |
13 | ||
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
14 | from PyQt6.QtCore import QCoreApplication, QEventLoop, Qt, QThread, pyqtSlot |
9482
a2bc06a54d9d
Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
15 | from PyQt6.QtSerialPort import QSerialPortInfo |
9815 | 16 | from PyQt6.QtWidgets import QDialog, QInputDialog |
8096 | 17 | |
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
18 | from eric7.EricGui import EricPixmapCache |
9903 | 19 | from eric7.EricWidgets import EricMessageBox |
9413
80c06d472826
Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9248
diff
changeset
|
20 | from eric7.EricWidgets.EricApplication import ericApp |
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
21 | from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
9624
b47dfa7a137d
Refactored the Utilities and Globals modules in order to enhance the maintainability.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9614
diff
changeset
|
22 | from eric7.SystemUtilities import FileSystemUtilities |
8096 | 23 | |
9759
4543b7876047
Adapted some MicroPython modules to the new package layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9736
diff
changeset
|
24 | from . import Devices |
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
25 | from .Ui_UF2FlashDialog import Ui_UF2FlashDialog |
8096 | 26 | |
27 | SupportedUF2Boards = { | |
28 | "circuitpython": { | |
29 | "volumes": { | |
30 | (0x03EB, 0x2402): [ | |
9903 | 31 | ("SAMD21", "SAMD21 Board"), |
32 | ("SAME54", "SAME54 Board"), | |
8096 | 33 | ], |
9248 | 34 | (0x04D8, 0xE799): [ |
9903 | 35 | ("ZEROBOOT", "Zero"), |
9248 | 36 | ], |
8096 | 37 | (0x04D8, 0xEC44): [ |
9903 | 38 | ("PYCUBEDBOOT", "PyCubedv04"), |
8096 | 39 | ], |
40 | (0x04D8, 0xEC63): [ | |
9903 | 41 | ("BOOT", "CircuitBrains Basic"), |
8096 | 42 | ], |
43 | (0x04D8, 0xEC64): [ | |
9903 | 44 | ("BOOT", "CircuitBrains Deluxe"), |
8096 | 45 | ], |
46 | (0x04D8, 0xED5F): [ | |
9903 | 47 | ("UCHIPYBOOT", "uChip CircuitPython"), |
8096 | 48 | ], |
49 | (0x04D8, 0xEDB3): [ | |
9903 | 50 | ("USBHUBBOOT", "Programmable USB Hub"), |
8096 | 51 | ], |
52 | (0x04D8, 0xEDBE): [ | |
9903 | 53 | ("SAM32BOOT", "SAM32"), |
8096 | 54 | ], |
55 | (0x04D8, 0xEF66): [ | |
9903 | 56 | ("SENSEBOX", "senseBox MCU"), |
8096 | 57 | ], |
58 | (0x1209, 0x2017): [ | |
9903 | 59 | ("MINISAMBOOT", "Mini SAM M4"), |
8096 | 60 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
61 | (0x1209, 0x3252): [ |
9903 | 62 | ("MCBS2OMBOOT", "Module Clip w/Wroom"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
63 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
64 | (0x1209, 0x3253): [ |
9903 | 65 | ("MCBS2ERBOOT", "Module Clip w/Wrover"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
66 | ], |
8096 | 67 | (0x1209, 0x4D44): [ |
9903 | 68 | ("ROBOM0BOOT", "Robo HAT MM1"), |
69 | ("ROBOM4BOOT", "Robo HAT MM1 M4"), | |
8096 | 70 | ], |
71 | (0x1209, 0x4DDD): [ | |
9903 | 72 | ("SapBOOT", "CP Sapling"), |
8096 | 73 | ], |
74 | (0x1209, 0x7102): [ | |
9903 | 75 | ("MINISAMBOOT", "Mini SAM M0"), |
8096 | 76 | ], |
9248 | 77 | (0x1209, 0x7380): [ |
9903 | 78 | ("CH840BOOT", "ILabs Challenger 840"), |
9248 | 79 | ], |
8919 | 80 | (0x1209, 0x7A01): [ |
9903 | 81 | ("MIKOTO-BOOT", "Mikoto nRF52840"), |
8919 | 82 | ], |
8096 | 83 | (0x1209, 0x805A): [ |
9903 | 84 | ("BASTBLE", "Bast BLE"), |
8096 | 85 | ], |
86 | (0x1209, 0xE3E2): [ | |
9903 | 87 | ("StackRduino", "StackRduino M0 PRO"), |
8096 | 88 | ], |
89 | (0x1209, 0xF501): [ | |
9903 | 90 | ("M4SHIMBOOT", "M4-Shim"), |
8096 | 91 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
92 | (0x15BA, 0x28DC): [ |
9903 | 93 | ("OLMLIPOBOOT", "ESP32S2 DevKit Lipo"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
94 | ], |
8096 | 95 | (0x16D0, 0x0CDA): [ |
9903 | 96 | ("AUTOMAT", "automat"), |
8096 | 97 | ], |
9614 | 98 | (0x16D0, 0x10ED): [ |
9903 | 99 | ("PillBug", "PillBug"), |
9614 | 100 | ], |
9248 | 101 | (0x1B4F, 0x0019): [ |
9903 | 102 | ("QwiicMicro", "Qwiic Micro SamD21"), |
9248 | 103 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
104 | (0x1B4F, 0x0022): [ |
9903 | 105 | ("SFMM852BOOT", "MicroMod nRF52840"), |
8096 | 106 | ], |
8956 | 107 | (0x1B4F, 0x002C): [ |
9903 | 108 | ("THNG+32BOOT", "Thing Plus - STM32"), |
8956 | 109 | ], |
8096 | 110 | (0x1B4F, 0x0D22): [ |
9903 | 111 | ("SPARKFUN", "SAMD21 Mini Breakout"), |
8096 | 112 | ], |
113 | (0x1B4F, 0x0D23): [ | |
9903 | 114 | ("SPARKFUN", "SAMD21 Dev Breakout"), |
8096 | 115 | ], |
116 | (0x1D50, 0x6110): [ | |
9903 | 117 | ("ROBOTICS", "Robotics"), |
8096 | 118 | ], |
119 | (0x1D50, 0x6112): [ | |
9903 | 120 | ("RCBOOT", "Wattuino RC"), |
8096 | 121 | ], |
8919 | 122 | (0x1D50, 0x6157): [ |
9903 | 123 | ("BBOARDBOOT", "nRF52840 BBoard"), |
8919 | 124 | ], |
8096 | 125 | (0x1D50, 0x6160): [ |
9903 | 126 | ("BLUEMICRO", "BlueMicro"), |
8096 | 127 | ], |
8919 | 128 | (0x1D50, 0x616F): [ |
9903 | 129 | ("BLUEMICRO", "BlueMicro"), |
8919 | 130 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
131 | (0x1FC9, 0x0094): [ |
9903 | 132 | ("DblM33BOOT", "Double M33"), |
133 | ("LPC5528BOOT", "LPCXpresso 55s28"), | |
134 | ("LPC5569BOOT", "LPCXpresso 55s69"), | |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
135 | ], |
8919 | 136 | (0x1FC9, 0x0154): [ |
9903 | 137 | ("K32L2BOOT", "FRDM-K32L2B3"), |
138 | ("K32L2BOOT", "KUIIC"), | |
8919 | 139 | ], |
8096 | 140 | (0x230A, 0x00E9): [ |
9903 | 141 | ("TAU_BOOT", "Tau"), |
8096 | 142 | ], |
143 | (0x2341, 0x0057): [ | |
9903 | 144 | ("NANOBOOT", "NANO 33 IoT"), |
8096 | 145 | ], |
146 | (0x2341, 0x8053): [ | |
9903 | 147 | ("MKR1300", "MKR1300"), |
148 | ], | |
149 | (0x2341, 0x8056): [ | |
150 | ("VIDOR4000", "MKR Vidor 4000"), | |
8096 | 151 | ], |
152 | (0x239A, 0x000F): [ | |
9903 | 153 | ("ITSYBOOT", "ItsyBitsy M0 Express"), |
8096 | 154 | ], |
155 | (0x239A, 0x0013): [ | |
9903 | 156 | ("METROBOOT", "Metro M0"), |
8096 | 157 | ], |
158 | (0x239A, 0x0015): [ | |
9903 | 159 | ("FEATHERBOOT", "Feather M0"), |
8096 | 160 | ], |
161 | (0x239A, 0x0018): [ | |
9903 | 162 | ("CPLAYBOOT", "CPlay Express"), |
8096 | 163 | ], |
164 | (0x239A, 0x001B): [ | |
9903 | 165 | ("FEATHERBOOT", "Feather M0 Express"), |
8096 | 166 | ], |
167 | (0x239A, 0x001C): [ | |
9903 | 168 | ("GEMMABOOT", "Gemma M0"), |
8096 | 169 | ], |
170 | (0x239A, 0x001E): [ | |
9903 | 171 | ("TRINKETBOOT", "Trinket M0"), |
8096 | 172 | ], |
173 | (0x239A, 0x0021): [ | |
9903 | 174 | ("METROM4BOOT", "Metro M4 Express"), |
8096 | 175 | ], |
176 | (0x239A, 0x0022): [ | |
9903 | 177 | ("ARCADE-D5", "Feather Arcade D51"), |
178 | ("FEATHERBOOT", "Feather M4 Express"), | |
8096 | 179 | ], |
180 | (0x239A, 0x0024): [ | |
9903 | 181 | ("RADIOBOOT", "Radiofruit M0"), |
8096 | 182 | ], |
183 | (0x239A, 0x0027): [ | |
9903 | 184 | ("PIRKEYBOOT", "pIRKey M0"), |
8096 | 185 | ], |
186 | (0x239A, 0x0029): [ | |
9903 | 187 | ("ARGONBOOT ", "Argon"), |
188 | ("BORONBOOT ", "Boron"), | |
189 | ("FTHR833BOOT", "Feather nRF52833 Express"), | |
190 | ("FTHR840BOOT", "Feather nRF52840 Express"), | |
191 | ("MDK840DONGL", "MDK nRF52840 USB Dongle"), | |
192 | ("WS52840EVK", "Waveshare nRF52840 Eval"), | |
193 | ("XENONBOOT ", "Xenon"), | |
8096 | 194 | ], |
195 | (0x239A, 0x002B): [ | |
9903 | 196 | ("ARCADE-D5", "Itsy Arcade D51"), |
197 | ("ITSYM4BOOT", "ItsyBitsy M4 Express"), | |
8096 | 198 | ], |
199 | (0x239A, 0x002D): [ | |
9903 | 200 | ("CRICKITBOOT", "crickit"), |
8096 | 201 | ], |
202 | (0x239A, 0x002F): [ | |
9903 | 203 | ("TRELM4BOOT", "Trellis M4 Express"), |
8096 | 204 | ], |
205 | (0x239A, 0x0031): [ | |
9903 | 206 | ("GCM4BOOT", "Grand Central M4 Express"), |
8096 | 207 | ], |
208 | (0x239A, 0x0033): [ | |
9903 | 209 | ("PYBADGEBOOT", "PyBadge"), |
8096 | 210 | ], |
211 | (0x239A, 0x0034): [ | |
9903 | 212 | ("BADGELCBOOT", "BadgeLC"), |
213 | ("PEWBOOT", "PewPew"), | |
8096 | 214 | ], |
215 | (0x239A, 0x0035): [ | |
9903 | 216 | ("MKRZEROBOOT", "MKRZero"), |
217 | ("PORTALBOOT", "PyPortal M4 Express"), | |
8096 | 218 | ], |
219 | (0x239A, 0x0037): [ | |
9903 | 220 | ("METROM4BOOT", "Metro M4 AirLift"), |
8096 | 221 | ], |
222 | (0x239A, 0x003D): [ | |
9903 | 223 | ("PYGAMERBOOT", "PyGamer"), |
8096 | 224 | ], |
225 | (0x239A, 0x003F): [ | |
9903 | 226 | ("METR840BOOT", "Metro nRF52840 Express"), |
8096 | 227 | ], |
228 | (0x239A, 0x0045): [ | |
9903 | 229 | ("CPLAYBTBOOT", "Circuit Playground nRF52840"), |
8096 | 230 | ], |
231 | (0x239A, 0x0047): [ | |
9903 | 232 | ("MASKM4BOOT", "Hallowing Mask M4"), |
8096 | 233 | ], |
234 | (0x239A, 0x0049): [ | |
9903 | 235 | ("HALLOM4BOOT", "HalloWing M4"), |
8096 | 236 | ], |
237 | (0x239A, 0x004D): [ | |
9903 | 238 | ("SNEKBOOT", "snekboard"), |
8096 | 239 | ], |
240 | (0x239A, 0x0051): [ | |
9903 | 241 | ("ITSY840BOOT", "ItsyBitsy nRF52840 Express"), |
8096 | 242 | ], |
243 | (0x239A, 0x0057): [ | |
9903 | 244 | ("SERPENTBOOT", "Serpente"), |
8096 | 245 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
246 | (0x239A, 0x0059): [ |
9903 | 247 | ("FTHR405BOOT", "Feather STM32F405 Express"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
248 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
249 | (0x239A, 0x005D): [ |
9903 | 250 | ("BlackPill", "STM32F401CxUx"), |
251 | ("STMF411BOOT", "STM32F411 Discovery"), | |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
252 | ], |
8096 | 253 | (0x239A, 0x0061): [ |
9903 | 254 | ("SOLBOOT", "Sol"), |
8096 | 255 | ], |
256 | (0x239A, 0x0063): [ | |
9903 | 257 | ("NANO33BOOT", "Nano 33 BLE"), |
8096 | 258 | ], |
259 | (0x239A, 0x0065): [ | |
9903 | 260 | ("ND6BOOT", "ndBit6"), |
8096 | 261 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
262 | (0x239A, 0x0069): [ |
9903 | 263 | ("STMF411BOOT", "STM32F411 BlackPill"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
264 | ], |
8096 | 265 | (0x239A, 0x006B): [ |
9903 | 266 | ("shIRtty", "shIRtty"), |
8096 | 267 | ], |
268 | (0x239A, 0x0071): [ | |
9903 | 269 | ("CLUEBOOT", "CLUE nRF52840"), |
8096 | 270 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
271 | (0x239A, 0x0077): [ |
9903 | 272 | ("RT1010BOOT", "RT1010 EVK"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
273 | ], |
8096 | 274 | (0x239A, 0x0079): [ |
9903 | 275 | ("ARAMBOOT", "ARAMCON Badge 2019"), |
8096 | 276 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
277 | (0x239A, 0x007B): [ |
9903 | 278 | ("ARAMBOOT", "ARAMCON2 Badge"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
279 | ], |
8096 | 280 | (0x239A, 0x007D): [ |
9903 | 281 | ("BOOKBOOT", "The Open Book Feather"), |
8096 | 282 | ], |
283 | (0x239A, 0x007F): [ | |
9903 | 284 | ("BADGEBOOT", "OHS2020 Badge"), |
8096 | 285 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
286 | (0x239A, 0x0081): [ |
9903 | 287 | ("RT1020BOOT", "RT1020 EVK"), |
288 | ("RT1024BOOT", "RT1024 EVK"), | |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
289 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
290 | (0x239A, 0x0083): [ |
9903 | 291 | ("RT1060BOOT", "RT1060 EVK"), |
292 | ("RT1064BOOT", "RT1064 EVK"), | |
293 | ], | |
294 | (0x239A, 0x0085): [ | |
295 | ("TNSY40BOOT", "Teensy 4.0"), | |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
296 | ], |
8096 | 297 | (0x239A, 0x0087): [ |
9903 | 298 | ("FTHRSNSBOOT", "Feather nRF52840 Sense"), |
8096 | 299 | ], |
300 | (0x239A, 0x0093): [ | |
9903 | 301 | ("ISVITABoot", "IkigaiSense Vita nRF52840"), |
8096 | 302 | ], |
303 | (0x239A, 0x0095): [ | |
9903 | 304 | ("UARTLOGBOOT", "UARTLogger II"), |
8096 | 305 | ], |
306 | (0x239A, 0x009F): [ | |
9903 | 307 | ("ADM840BOOT", "AtelierDuMaker NRF52840 Breakout"), |
8096 | 308 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
309 | (0x239A, 0x00A5): [ |
9903 | 310 | ("S3DKC1BOOT", "ESP32S3 DevKitC 1"), |
311 | ("S3DKM1BOOT", "ESP32S3 DevKitM 1"), | |
312 | ("SAOLA1RBOOT", "Saola 1R WROVER"), | |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
313 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
314 | (0x239A, 0x00A7): [ |
9903 | 315 | ("SAOLA1MBOOT", "Saola 1M WROOM"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
316 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
317 | (0x239A, 0x00AB): [ |
9903 | 318 | ("UFTHRS2BOOT", "FeatherS2"), |
319 | ], | |
320 | (0x239A, 0x00AD): [ | |
321 | ("TNSY41BOOT", "Teensy 4.1"), | |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
322 | ], |
8096 | 323 | (0x239A, 0x00AF): [ |
9903 | 324 | ("FLUFFBOOT", "Fluff M0"), |
8096 | 325 | ], |
326 | (0x239A, 0x00B3): [ | |
9903 | 327 | ("NICENANO", "nice!nano"), |
8096 | 328 | ], |
329 | (0x239A, 0x00B5): [ | |
9903 | 330 | ("E54XBOOT", "SAME54 Xplained"), |
8096 | 331 | ], |
332 | (0x239A, 0x00B9): [ | |
9903 | 333 | ("ND7BOOT", "ndBit7"), |
8096 | 334 | ], |
8919 | 335 | (0x239A, 0x00BB): [ |
9903 | 336 | ("MDBT50QBOOT", "Raytac MDBT50Q Demo Board 40"), |
8919 | 337 | ], |
8096 | 338 | (0x239A, 0x00BF): [ |
9903 | 339 | ("BADGEBOOT", "BLM Badge"), |
8096 | 340 | ], |
341 | (0x239A, 0x00C3): [ | |
9903 | 342 | ("GEMINIBOOT", "Gemini"), |
8096 | 343 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
344 | (0x239A, 0x00C5): [ |
9903 | 345 | ("MICROS2BOOT", "microS2"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
346 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
347 | (0x239A, 0x00C7): [ |
9903 | 348 | ("KALUGA1BOOT", "Kaluga 1"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
349 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
350 | (0x239A, 0x00C9): [ |
9903 | 351 | ("MATRIXBOOT", "Matrix Portal M4"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
352 | ], |
8096 | 353 | (0x239A, 0x00CB): [ |
9903 | 354 | ("QTPY_BOOT", "QT Py M0"), |
8096 | 355 | ], |
356 | (0x239A, 0x00CD): [ | |
9903 | 357 | ("FTHRCANBOOT", "Feather M4 CAN Express"), |
8096 | 358 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
359 | (0x239A, 0x00DE): [ |
9903 | 360 | ("NANOESPBOOT", "nanoESP32-S2 WROOM"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
361 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
362 | (0x239A, 0x00DF): [ |
9903 | 363 | ("METROS2BOOT", "Metro ESP32-S2"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
364 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
365 | (0x239A, 0x00E1): [ |
9903 | 366 | ("METROM7BOOT", "Metro M7 iMX RT1011"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
367 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
368 | (0x239A, 0x00E5): [ |
9903 | 369 | ("MAGTAGBOOT", "Metro MagTag 2.9 Grayscale"), |
370 | ("MAGTAGBOOT", "MagTag 2.9 Grayscale"), | |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
371 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
372 | (0x239A, 0x00EB): [ |
9903 | 373 | ("FTHRS2BOOT", "Feather ESP32-S2"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
374 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
375 | (0x239A, 0x00ED): [ |
9903 | 376 | ("FTHRS2BOOT", "Feather ESP32-S2 Reverse TFT"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
377 | ], |
8096 | 378 | (0x239A, 0x00EF): [ |
9903 | 379 | ("TRINKEYBOOT", "NeoPixel Trinkey M0"), |
8096 | 380 | ], |
381 | (0x239A, 0x00F5): [ | |
9903 | 382 | ("STARBOOT", "Binary Star"), |
8096 | 383 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
384 | (0x239A, 0x00F9): [ |
9903 | 385 | ("HOUSEBOOT", "FunHouse"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
386 | ], |
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
387 | (0x239A, 0x00FB): [ |
9903 | 388 | ("TRINKEYBOOT", "Rotary Trinkey M0"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
389 | ], |
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
390 | (0x239A, 0x00FF): [ |
9903 | 391 | ("TRINKEYBOOT", "NeoKey Trinkey M0"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
392 | ], |
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
393 | (0x239A, 0x0101): [ |
9903 | 394 | ("TRINKEYBOOT", "Slide Trinkey M0"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
395 | ], |
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
396 | (0x239A, 0x0103): [ |
9903 | 397 | ("TRINKEYBOOT", "ProxSense Trinkey M0"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
398 | ], |
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
399 | (0x239A, 0x010B): [ |
9903 | 400 | ("MDBT50QBOOT", "Raytac MDBT50Q-RX"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
401 | ], |
8919 | 402 | (0x239A, 0x010D): [ |
9903 | 403 | ("GLASSESBOOT", "LED Glasses Driver nRF52840"), |
8919 | 404 | ], |
405 | (0x239A, 0x010F): [ | |
9903 | 406 | ("FTHRS2BOOT", "Feather ESP32-S2 TFT"), |
8919 | 407 | ], |
408 | (0x239A, 0x0111): [ | |
9903 | 409 | ("QTPYS2BOOT", "QT Py ESP32-S2"), |
8919 | 410 | ], |
9051 | 411 | (0x239A, 0x0113): [ |
9903 | 412 | ("FTHRS3BOOT", "Feather ESP32-S3 No PSRAM"), |
9051 | 413 | ], |
8919 | 414 | (0x239A, 0x0115): [ |
9903 | 415 | ("FEATHERBOOT", "Feather M4 Adalogger"), |
8919 | 416 | ], |
417 | (0x239A, 0x0117): [ | |
9903 | 418 | ("CAMERABOOT", "Camera"), |
8919 | 419 | ], |
8956 | 420 | (0x239A, 0x0119): [ |
9903 | 421 | ("QTPYS3BOOT", "QT Py ESP32-S3"), |
8956 | 422 | ], |
9248 | 423 | (0x239A, 0x011D): [ |
9903 | 424 | ("FTHRS3BOOT", "Feather ESP32-S3 TFT"), |
9248 | 425 | ], |
9614 | 426 | (0x239A, 0x0123): [ |
9903 | 427 | ("FTHRS3BOOT", "Feather ESP32-S3 Reverse TFT"), |
9614 | 428 | ], |
429 | (0x239A, 0x0125): [ | |
9903 | 430 | ("MATRIXBOOT", "MatrixPortal ESP32-S2"), |
10112 | 431 | ("MATRXS3BOOT", "MatrixPortal S3"), |
432 | ], | |
433 | (0x239A, 0x0133): [ | |
434 | ("RT1050BOOT", "RT1050 EVK"), | |
435 | ], | |
436 | (0x239A, 0x0135): [ | |
437 | ("RT1040BOOT", "RT1040 EVK"), | |
438 | ], | |
439 | (0x239A, 0x0137): [ | |
440 | ("RT1015BOOT", "RT1015 EVK"), | |
441 | ], | |
442 | (0x239A, 0x013F): [ | |
443 | ("TOYS2BOOT", "My Little Hacker ESP32-S2"), | |
444 | ], | |
445 | (0x239A, 0x0143): [ | |
446 | ("QTPYS3BOOT", "QT Py ESP32-S3 (4M Flash, 2M PSRAM)"), | |
9614 | 447 | ], |
448 | (0x239A, 0x2030): [ | |
9903 | 449 | ("MBBOOT", "Maker badge"), |
9614 | 450 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
451 | (0x239A, 0x800B): [ |
9903 | 452 | ("ATMZBOOT", "ATMegaZero ESP32-S2"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
453 | ], |
8096 | 454 | (0x239A, 0xB000): [ |
9903 | 455 | ("HALLOWBOOT", "Hallowing M0"), |
8096 | 456 | ], |
457 | (0x239A, 0xE005): [ | |
9903 | 458 | ("HONKBOOT", "Big Honking Button"), |
8096 | 459 | ], |
460 | (0x2886, 0x000D): [ | |
9903 | 461 | ("Grove Zero", "Grove Zero"), |
8096 | 462 | ], |
463 | (0x2886, 0x002F): [ | |
9903 | 464 | ("Seeed XIAO", "Seeeduino XIAO"), |
465 | ], | |
466 | (0x2886, 0x0044): [ | |
467 | ("XIAO-BOOT", "XIAO nRF52840"), | |
468 | ], | |
469 | (0x2886, 0x0045): [ | |
470 | ("XIAO-SENSE", "XIAO nRF52840"), | |
8096 | 471 | ], |
10112 | 472 | (0x2886, 0x8056): [ |
473 | ("XIAOS3BOOT", "XIAO ESP32-S3"), | |
474 | ], | |
8096 | 475 | (0x2886, 0xF00E): [ |
9903 | 476 | ("PITAYAGO", "Pitaya Go"), |
8096 | 477 | ], |
478 | (0x2886, 0xF00F): [ | |
9903 | 479 | ("M60KEYBOARD", "MakerDiary M60 Mechanical Keyboard"), |
480 | ("nRF52840M2", "MakerDiary nRF52840 M.2 Module"), | |
8096 | 481 | ], |
8919 | 482 | (0x303A, 0x7000): [ |
9903 | 483 | ("ESPHMI1BOOT", "HMI 1"), |
8919 | 484 | ], |
9614 | 485 | (0x303A, 0x7004): [ |
9903 | 486 | ("S3BOXBOOT", "ESP32S3 Box 2.5"), |
9614 | 487 | ], |
488 | (0x303A, 0x700E): [ | |
9903 | 489 | ("S3EYEBOOT", "ESP32S3 EYE"), |
9614 | 490 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
491 | (0x303A, 0x8005): [ |
9903 | 492 | ("TINYS2BOOT", "TinyS2"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
493 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
494 | (0x303A, 0x8008): [ |
9903 | 495 | ("TTGOS2BOOT", "TTGO_T8_S2_Display"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
496 | ], |
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
497 | (0x303A, 0x800E): [ |
9903 | 498 | ("CCMBRISBOOT", "CucumberRIS v1.1"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
499 | ], |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
500 | (0x303A, 0x80B0): [ |
9903 | 501 | ("RD00RBOOT", "Reference Design RD00"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
502 | ], |
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
503 | (0x303A, 0x80B3): [ |
9903 | 504 | ("NANOESPBOOT", "nanoESP32-S2 WROVER"), |
8462
34bb10914b21
Extended the list of known CircuitPython and UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
505 | ], |
8919 | 506 | (0x303A, 0x80B5): [ |
9903 | 507 | ("FS2NEOBOOT", "FeatherS2 Neo"), |
8919 | 508 | ], |
509 | (0x303A, 0x80B6): [ | |
9903 | 510 | ("MORPHBOOT", "MORPHESP-240"), |
8919 | 511 | ], |
512 | (0x303A, 0x80C4): [ | |
9903 | 513 | ("S2MINIBOOT", "S2 Mini"), |
8919 | 514 | ], |
515 | (0x303A, 0x80C7): [ | |
9903 | 516 | ("S2PICOBOOT", "S2 Pico"), |
8919 | 517 | ], |
8956 | 518 | (0x303A, 0x80D2): [ |
9903 | 519 | ("TINYS3BOOT", "TinyS3"), |
8956 | 520 | ], |
521 | (0x303A, 0x80D5): [ | |
9903 | 522 | ("PROS3BOOT", "ProS3"), |
8956 | 523 | ], |
524 | (0x303A, 0x80D8): [ | |
9903 | 525 | ("UFTHRS3BOOT", "FeatherS3"), |
8956 | 526 | ], |
8919 | 527 | (0x303A, 0x80DA): [ |
9903 | 528 | ("HEXKYBOOT", "HexKy-S2"), |
8919 | 529 | ], |
10112 | 530 | (0x303A, 0x80DC): [ |
531 | ("ZEROS3BOOT", "ZeroS3"), | |
532 | ], | |
9051 | 533 | (0x303A, 0x80DE): [ |
9903 | 534 | ("LEAFS3BOOT", "BPI-Leaf-S3"), |
9051 | 535 | ], |
536 | (0x303A, 0x80E1): [ | |
9903 | 537 | ("LEAFS2BOOT", "BPI-Leaf-S2"), |
9051 | 538 | ], |
539 | (0x303A, 0x80E4): [ | |
9903 | 540 | ("BITS2BOOT", "BPI-BIT-S2"), |
9051 | 541 | ], |
542 | (0x303A, 0x80EB): [ | |
9903 | 543 | ("TTGOS2BOOT", "TTGO_T8_S2_WROOM"), |
9051 | 544 | ], |
545 | (0x303A, 0x80EE): [ | |
9903 | 546 | ("TTGOS2BOOT", "TTGO_T8_S2"), |
9051 | 547 | ], |
9614 | 548 | (0x303A, 0x80FA): [ |
9903 | 549 | ("MFAS3BOOT", "Maker Feather AIoT S3"), |
9614 | 550 | ], |
9248 | 551 | (0x303A, 0x8101): [ |
9903 | 552 | ("MMAINS2BOOT", "MiniMain ESP32-S2"), |
9248 | 553 | ], |
9614 | 554 | (0x303A, 0x8109): [ |
9903 | 555 | ("ESP32S2PICO", "ESP32-S2-Pico"), |
9614 | 556 | ], |
557 | (0x303A, 0x810B): [ | |
9903 | 558 | ("ESP32S2PICO", "ESP32-S2-Pico-LCD"), |
9614 | 559 | ], |
560 | (0x303A, 0x8112): [ | |
9903 | 561 | ("BEES3BOOT", "Bee S3"), |
9614 | 562 | ], |
563 | (0x303A, 0x8115): [ | |
9903 | 564 | ("BMS3BOOT", "Bee Motion S3"), |
9614 | 565 | ], |
566 | (0x303A, 0x8118): [ | |
9903 | 567 | ("LOLIN3BOOT", "S3"), |
9614 | 568 | ], |
10112 | 569 | (0x303A, 0x8121): [ |
570 | ("ATOMS3BOOT", "AtomS3"), | |
571 | ], | |
9614 | 572 | (0x303A, 0x812D): [ |
9903 | 573 | ("UF2BOOT", "BPI-PicoW-S3"), |
9614 | 574 | ], |
575 | (0x303A, 0x8134): [ | |
9903 | 576 | ("TBEAMBOOT", "T-Beam Supreme"), |
9614 | 577 | ], |
10112 | 578 | (0x303A, 0x8143): [ |
579 | ("DYMBOOT", "Deneyap Mini"), | |
580 | ], | |
581 | (0x303A, 0x8146): [ | |
582 | ("DYM2BOOT", "Deneyap Mini v2"), | |
583 | ], | |
584 | (0x303A, 0x8149): [ | |
585 | ("DY1A2BOOT", "Deneyap Kart 1A v2"), | |
586 | ], | |
587 | (0x303A, 0x8160): [ | |
588 | ("ATOMS3BOOT", "AtomS3 Lite"), | |
589 | ], | |
590 | (0x303A, 0x8165): [ | |
591 | ("YDESP32S3", "YD-ESP32-S3"), | |
592 | ], | |
9248 | 593 | (0x30A4, 0x0002): [ |
9903 | 594 | ("SWANBOOT", "Swan R5"), |
9248 | 595 | ], |
8096 | 596 | (0x3171, 0x0100): [ |
9903 | 597 | ("CMDBOOT", "COMMANDER"), |
8096 | 598 | ], |
8956 | 599 | (0x80E7, 0x8111): [ |
9903 | 600 | ("IOTS2BOOT", "HiiBot IoTs2"), |
8956 | 601 | ], |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
602 | (0xCAFE, 0xFFFF): [ |
9903 | 603 | ("F303BOOT", "STM32F303 Discovery"), |
8101
dee984e05647
UF2FlashDialog: extended the list of known UF2 capable devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8099
diff
changeset
|
604 | ], |
8096 | 605 | }, |
606 | "instructions": QCoreApplication.translate( | |
607 | "UF2FlashDialog", | |
608 | "<h3>CircuitPython Board</h3>" | |
609 | "<p>In order to prepare the board for flashing follow these" | |
610 | " steps:</p><ol>" | |
611 | "<li>Switch your device to 'bootloader' mode by double-pressing" | |
612 | " the reset button.</li>" | |
613 | "<li>Wait until the device has entered 'bootloader' mode.</li>" | |
614 | "<li>(If this does not happen, then try shorter or longer" | |
615 | " pauses between presses.)</li>" | |
616 | "<li>Ensure the boot volume is available (this may require" | |
617 | " mounting it).</li>" | |
618 | "<li>Select the firmware file to be flashed and click the" | |
619 | " flash button.</li>" | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
620 | "</ol>", |
8096 | 621 | ), |
8170
fb77bff32621
MicroPython: corrected a glitch in the UF2 flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8167
diff
changeset
|
622 | "show_all": True, |
8096 | 623 | "firmware": "CircuitPython", |
624 | }, | |
625 | "rp2040": { | |
8111
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
626 | "volumes": { |
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
627 | (0x0000, 0x0000): [ |
9903 | 628 | ("RPI-RP2", "Raspberry Pi Pico"), # we don't have valid VID/PID |
8111
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
629 | ], |
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
630 | }, |
8096 | 631 | "instructions": QCoreApplication.translate( |
632 | "UF2FlashDialog", | |
633 | "<h3>Pi Pico (RP2040) Board</h3>" | |
634 | "<p>In order to prepare the board for flashing follow these" | |
635 | " steps:</p><ol>" | |
8167
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
636 | "<li>Enter 'bootloader' mode (board <b>without</b> RESET button):" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
637 | "<ul>" |
8096 | 638 | "<li>Plug in your board while holding the BOOTSEL button.</li>" |
8167
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
639 | "</ul>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
640 | "Enter 'bootloader' mode (board <b>with</b> RESET button):" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
641 | "<ul>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
642 | "<li>hold down RESET</li>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
643 | "<li>hold down BOOTSEL</li>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
644 | "<li>release RESET</li>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
645 | "<li>release BOOTSEL</li>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
646 | "</ul></li>" |
8096 | 647 | "<li>Wait until the device has entered 'bootloader' mode.</li>" |
648 | "<li>Ensure the boot volume is available (this may require" | |
649 | " mounting it).</li>" | |
650 | "<li>Select the firmware file to be flashed and click the" | |
651 | " flash button.</li>" | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
652 | "</ol>", |
8096 | 653 | ), |
8170
fb77bff32621
MicroPython: corrected a glitch in the UF2 flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8167
diff
changeset
|
654 | "show_all": True, |
8120
84928e9f446f
UF2FlashDialog: updated a string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8111
diff
changeset
|
655 | "firmware": "MicroPython / CircuitPython", |
8096 | 656 | }, |
657 | } | |
658 | ||
659 | ||
660 | def getFoundDevices(boardType=""): | |
661 | """ | |
662 | Function to get the list of known serial devices supporting UF2. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
663 | |
8096 | 664 | @param boardType specific board type to search for |
665 | @type str | |
666 | @return list of tuples with the board type, the port description, the | |
667 | VID and PID | |
9904
5d9a7d1afbd9
Changed the UF2 Dialog slightly to eliminate duplicate device entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9903
diff
changeset
|
668 | @rtype list of tuple of (str, str, (int, int)) |
8096 | 669 | """ |
9904
5d9a7d1afbd9
Changed the UF2 Dialog slightly to eliminate duplicate device entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9903
diff
changeset
|
670 | foundDevices = set() |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
671 | |
9954 | 672 | # step 1: determine all known UF2 volumes that are mounted |
673 | boardTypes = [boardType] if boardType else list(SupportedUF2Boards.keys()) | |
674 | for board in boardTypes: | |
675 | for vidpid, volumes in SupportedUF2Boards[board]["volumes"].items(): | |
676 | for volume, description in volumes: | |
677 | if FileSystemUtilities.findVolume(volume, findAll=True): | |
678 | foundDevices.add((board, description, vidpid)) | |
679 | ||
680 | # set 2: determine all devices that have their UF2 volume not mounted | |
8096 | 681 | availablePorts = QSerialPortInfo.availablePorts() |
682 | for port in availablePorts: | |
683 | vid = port.vendorIdentifier() | |
684 | pid = port.productIdentifier() | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
685 | |
8096 | 686 | if vid == 0 and pid == 0: |
687 | # no device detected at port | |
688 | continue | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
689 | |
8096 | 690 | for board in SupportedUF2Boards: |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
691 | if (not boardType or (board.startswith(boardType))) and ( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
692 | vid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
693 | pid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
694 | ) in SupportedUF2Boards[board]["volumes"]: |
9954 | 695 | for device in foundDevices: |
696 | if (vid, pid) == device[2]: | |
697 | break | |
698 | else: | |
699 | foundDevices.add( | |
700 | ( | |
701 | board, | |
702 | port.description(), | |
703 | (vid, pid), | |
704 | ) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
705 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
706 | |
9904
5d9a7d1afbd9
Changed the UF2 Dialog slightly to eliminate duplicate device entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9903
diff
changeset
|
707 | return list(foundDevices) |
8096 | 708 | |
709 | ||
710 | class UF2FlashDialog(QDialog, Ui_UF2FlashDialog): | |
711 | """ | |
712 | Class implementing a dialog to flash any UF2 capable device. | |
713 | """ | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
714 | |
8143
2c730d5fd177
Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8120
diff
changeset
|
715 | DeviceTypeRole = Qt.ItemDataRole.UserRole |
2c730d5fd177
Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8120
diff
changeset
|
716 | DeviceVidPidRole = Qt.ItemDataRole.UserRole + 1 |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
717 | |
8096 | 718 | def __init__(self, boardType="", parent=None): |
719 | """ | |
720 | Constructor | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
721 | |
8096 | 722 | @param boardType specific board type to show the dialog for |
723 | @type str | |
724 | @param parent reference to the parent widget (defaults to None) | |
725 | @type QWidget (optional) | |
726 | """ | |
8218
7c09585bd960
Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8170
diff
changeset
|
727 | super().__init__(parent) |
8096 | 728 | self.setupUi(self) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
729 | |
9413
80c06d472826
Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9248
diff
changeset
|
730 | self.refreshButton.setIcon(EricPixmapCache.getIcon("rescan")) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
731 | |
8356
68ec9c3d4de5
Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8327
diff
changeset
|
732 | self.firmwarePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
8096 | 733 | self.firmwarePicker.setFilters( |
9576
be9f8e7e42e0
Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
734 | self.tr("MicroPython/CircuitPython Files (*.uf2);;All Files (*)") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
735 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
736 | |
8356
68ec9c3d4de5
Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8327
diff
changeset
|
737 | self.bootPicker.setMode(EricPathPickerModes.DIRECTORY_SHOW_FILES_MODE) |
8096 | 738 | self.bootPicker.setEnabled(False) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
739 | |
9815 | 740 | self.searchBootButton.setIcon(EricPixmapCache.getIcon("question")) |
741 | self.searchBootButton.setEnabled(False) | |
742 | ||
8096 | 743 | self.__mandatoryStyleSheet = ( |
8862
99459beb81b1
Adapted some style sheet usages to observe the palette lightness (dark/light).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
744 | "QLineEdit {border: 2px solid; border-color: #dd8888}" |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
745 | if ericApp().usesDarkPalette() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
746 | else "QLineEdit {border: 2px solid; border-color: #800000}" |
8096 | 747 | ) |
748 | self.__manualType = "<manual>" | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
749 | |
8096 | 750 | self.__boardType = boardType |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
751 | |
8096 | 752 | self.__populate() |
753 | self.__updateFlashButton() | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
754 | |
8096 | 755 | def __populate(self): |
756 | """ | |
757 | Private method to (re-)populate the dialog. | |
758 | """ | |
759 | # save the currently selected device | |
760 | currentDevice = self.devicesComboBox.currentText() | |
761 | firmwareFile = self.firmwarePicker.text() | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
762 | |
8096 | 763 | # clear the entries first |
764 | self.devicesComboBox.clear() | |
765 | self.firmwarePicker.clear() | |
766 | self.bootPicker.clear() | |
767 | self.infoLabel.clear() | |
768 | self.infoEdit.clear() | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
769 | |
8096 | 770 | # now populate the entries with data |
771 | devices = getFoundDevices(boardType=self.__boardType) | |
772 | if len(devices) == 0: | |
773 | # no device detected | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
774 | devices = list( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
775 | filter( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
776 | lambda x: x[0] in SupportedUF2Boards, |
9759
4543b7876047
Adapted some MicroPython modules to the new package layout.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9736
diff
changeset
|
777 | Devices.getFoundDevices()[0], |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
778 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
779 | ) |
8096 | 780 | if devices: |
781 | self.__showSpecificInstructions(list(devices)) | |
782 | else: | |
783 | self.__showAllInstructions() | |
784 | self.devicesComboBox.addItem(self.tr("Manual Select")) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
785 | self.devicesComboBox.setItemData(1, self.__manualType, self.DeviceTypeRole) |
8096 | 786 | elif len(devices) == 1: |
8167
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
787 | # set the board type to the found one |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
788 | self.__boardType = devices[0][0] |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
789 | |
8096 | 790 | self.devicesComboBox.addItem(devices[0][1]) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
791 | self.devicesComboBox.setItemData(0, devices[0][0], self.DeviceTypeRole) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
792 | self.devicesComboBox.setItemData(0, devices[0][2], self.DeviceVidPidRole) |
8096 | 793 | self.devicesComboBox.addItem(self.tr("Manual Select")) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
794 | self.devicesComboBox.setItemData(1, self.__manualType, self.DeviceTypeRole) |
8096 | 795 | self.on_devicesComboBox_currentIndexChanged(0) |
796 | else: | |
9953
1aa8517bc61f
Enhanced the UF2 flash dialog slightly.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9904
diff
changeset
|
797 | for index, (boardType, description, vidpid) in enumerate(sorted(devices)): |
8096 | 798 | self.devicesComboBox.addItem(description) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
799 | self.devicesComboBox.setItemData(index, boardType, self.DeviceTypeRole) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
800 | self.devicesComboBox.setItemData(index, vidpid, self.DeviceVidPidRole) |
8096 | 801 | self.devicesComboBox.addItem(self.tr("Manual Select")) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
802 | self.devicesComboBox.setItemData( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
803 | index + 1, self.__manualType, self.DeviceTypeRole |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
804 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
805 | |
9953
1aa8517bc61f
Enhanced the UF2 flash dialog slightly.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9904
diff
changeset
|
806 | # select the remembered device, if it is still there |
8096 | 807 | if currentDevice: |
808 | self.devicesComboBox.setCurrentText(currentDevice) | |
9954 | 809 | if self.devicesComboBox.currentIndex() == -1 and len(devices) == 1: |
810 | # the device name has changed but only one is present; select it | |
811 | self.devicesComboBox.setCurrentIndex(0) | |
8096 | 812 | self.firmwarePicker.setText(firmwareFile) |
9953
1aa8517bc61f
Enhanced the UF2 flash dialog slightly.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9904
diff
changeset
|
813 | elif len(devices) == 1: |
1aa8517bc61f
Enhanced the UF2 flash dialog slightly.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9904
diff
changeset
|
814 | self.devicesComboBox.setCurrentIndex(0) |
8096 | 815 | else: |
9953
1aa8517bc61f
Enhanced the UF2 flash dialog slightly.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9904
diff
changeset
|
816 | self.devicesComboBox.setCurrentIndex(-1) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
817 | |
8096 | 818 | def __updateFlashButton(self): |
819 | """ | |
820 | Private method to update the state of the Flash button and the retest | |
821 | button. | |
822 | """ | |
823 | firmwareFile = self.firmwarePicker.text() | |
824 | if self.devicesComboBox.currentData(self.DeviceTypeRole) is not None: | |
825 | if bool(firmwareFile) and os.path.exists(firmwareFile): | |
826 | self.firmwarePicker.setStyleSheet("") | |
827 | else: | |
828 | self.firmwarePicker.setStyleSheet(self.__mandatoryStyleSheet) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
829 | |
8096 | 830 | if bool(self.bootPicker.text()): |
831 | self.bootPicker.setStyleSheet("") | |
832 | else: | |
833 | self.bootPicker.setStyleSheet(self.__mandatoryStyleSheet) | |
834 | else: | |
835 | self.firmwarePicker.setStyleSheet("") | |
836 | self.bootPicker.setStyleSheet("") | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
837 | |
8096 | 838 | enable = ( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
839 | bool(self.bootPicker.text()) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
840 | and bool(firmwareFile) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
841 | and os.path.exists(firmwareFile) |
8096 | 842 | ) |
843 | self.flashButton.setEnabled(enable) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
844 | |
8096 | 845 | def __showAllInstructions(self): |
846 | """ | |
847 | Private method to show instructions for resetting devices to bootloader | |
848 | mode. | |
849 | """ | |
850 | self.infoLabel.setText(self.tr("Reset Instructions:")) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
851 | |
8096 | 852 | htmlText = self.tr( |
853 | "<h4>No known devices detected.</h4>" | |
854 | "<p>Follow the appropriate instructions below to set <b>one</b>" | |
855 | " board into 'bootloader' mode. Press <b>Refresh</b> when ready." | |
856 | "</p>" | |
857 | ) | |
858 | for boardType in SupportedUF2Boards: | |
8170
fb77bff32621
MicroPython: corrected a glitch in the UF2 flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8167
diff
changeset
|
859 | if SupportedUF2Boards[boardType]["show_all"]: |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
860 | htmlText += "<hr/>" + SupportedUF2Boards[boardType]["instructions"] |
8096 | 861 | self.infoEdit.setHtml(htmlText) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
862 | |
8096 | 863 | def __showSpecificInstructions(self, devices): |
864 | """ | |
865 | Private method to show instructions for resetting devices to bootloader | |
866 | mode for a list of detected devices. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
867 | |
8096 | 868 | @param devices list of detected devices |
869 | @type list of str | |
870 | """ | |
8099
522946e53835
Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8097
diff
changeset
|
871 | boardTypes = {x[0] for x in devices} |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
872 | |
8096 | 873 | self.infoLabel.setText(self.tr("Reset Instructions:")) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
874 | |
8096 | 875 | if self.__boardType: |
876 | htmlText = self.tr( | |
877 | "<h4>Flash {0} Firmware</h4>" | |
878 | "<p>Follow the instructions below to set <b>one</b> board into" | |
879 | " 'bootloader' mode. Press <b>Refresh</b> when ready.</p>" | |
880 | "<hr/>{1}" | |
881 | ).format( | |
882 | SupportedUF2Boards[self.__boardType]["firmware"], | |
883 | SupportedUF2Boards[self.__boardType]["instructions"], | |
884 | ) | |
885 | else: | |
886 | htmlText = self.tr( | |
887 | "<h4>Potentially UF2 capable devices found</h4>" | |
888 | "<p>Found these potentially UF2 capable devices:</p>" | |
889 | "<ul><li>{0}</li></ul>" | |
890 | "<p>Follow the instructions below to set <b>one</b> board into" | |
891 | " 'bootloader' mode. Press <b>Refresh</b> when ready.</p>" | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
892 | ).format("</li><li>".join(sorted(x[1] for x in devices))) |
8096 | 893 | for boardType in sorted(boardTypes): |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
894 | htmlText += "<hr/>" + SupportedUF2Boards[boardType]["instructions"] |
8096 | 895 | self.infoEdit.setHtml(htmlText) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
896 | |
8096 | 897 | def __showTypedInstructions(self, boardType): |
898 | """ | |
899 | Private method to show instructions for resetting devices to bootloader | |
900 | mode for a specific board type. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
901 | |
8096 | 902 | @param boardType type of the board to show instructions for |
903 | @type str | |
904 | """ | |
905 | self.infoLabel.setText(self.tr("Reset Instructions:")) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
906 | |
8096 | 907 | htmlText = self.tr( |
908 | "<h4>No known devices detected.</h4>" | |
909 | "<p>Follow the instructions below to set <b>one</b> board into" | |
910 | " 'bootloader' mode. Press <b>Refresh</b> when ready.</p>" | |
911 | ) | |
912 | htmlText += "<hr/>" + SupportedUF2Boards[boardType]["instructions"] | |
913 | self.infoEdit.setHtml(htmlText) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
914 | |
8096 | 915 | def __showManualInstructions(self): |
916 | """ | |
917 | Private method to show instructions for flashing devices manually. | |
918 | """ | |
919 | self.infoLabel.setText(self.tr("Flash Instructions:")) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
920 | |
8096 | 921 | htmlText = self.tr( |
922 | "<h4>Flash method 'manual' selected.</h4>" | |
923 | "<p>Follow the instructions below to flash a device by entering" | |
8097
5af9c426c46b
Updated translations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
924 | " the data manually.</p><ol>" |
8096 | 925 | "<li>Change the device to 'bootloader' mode.</li>" |
926 | "<li>Wait until the device has entered 'bootloader' mode.</li>" | |
927 | "<li>Ensure the boot volume is available (this may require" | |
928 | " mounting it) and select its path.</li>" | |
929 | "<li>Select the firmware file to be flashed and click the" | |
930 | " flash button.</li>" | |
931 | "</ol>" | |
932 | ) | |
933 | for boardType in SupportedUF2Boards: | |
934 | htmlText += "<hr/>" + SupportedUF2Boards[boardType]["instructions"] | |
935 | self.infoEdit.setHtml(htmlText) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
936 | |
8167
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
937 | def __showNoVolumeInformation(self, volumes, boardType): |
8096 | 938 | """ |
939 | Private method to show information about the expected boot volume(s). | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
940 | |
8096 | 941 | @param volumes list of expected volume names |
942 | @type list of str | |
8167
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
943 | @param boardType type of the board to show instructions for |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
944 | @type str |
8096 | 945 | """ |
946 | self.infoLabel.setText(self.tr("Boot Volume not found:")) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
947 | |
8096 | 948 | htmlText = self.tr( |
949 | "<h4>No Boot Volume detected.</h4>" | |
950 | "<p>Please ensure that the boot volume of the device to be flashed" | |
951 | " is available. " | |
952 | ) | |
953 | if len(volumes) == 1: | |
954 | htmlText += self.tr( | |
955 | "This volume should be named <b>{0}</b>." | |
956 | " Press <b>Refresh</b> when ready.</p>" | |
957 | ).format(volumes[0]) | |
958 | else: | |
959 | htmlText += self.tr( | |
960 | "This volume should have one of these names.</p>" | |
961 | "<ul><li>{0}</li></ul>" | |
962 | "<p>Press <b>Refresh</b> when ready.</p>" | |
963 | ).format("</li><li>".join(sorted(volumes))) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
964 | |
8167
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
965 | if boardType: |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
966 | htmlText += self.tr( |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
967 | "<h4>Reset Instructions</h4>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
968 | "<p>Follow the instructions below to set the board into" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
969 | " 'bootloader' mode. Press <b>Refresh</b> when ready.</p>" |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
970 | ) |
cdc1b6692766
MicroPython: improved the UF2 Flash dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
971 | htmlText += "<hr/>" + SupportedUF2Boards[boardType]["instructions"] |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
972 | |
8096 | 973 | self.infoEdit.setHtml(htmlText) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
974 | |
8096 | 975 | def __showMultipleVolumesInformation(self, volumePaths): |
976 | """ | |
977 | Private method to show information because multiple devices of the | |
978 | same type are ready for flashing. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
979 | |
8096 | 980 | Note: This is a dangerous situation! |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
981 | |
8096 | 982 | @param volumePaths list of volume paths |
983 | @type list of str | |
984 | """ | |
985 | self.infoLabel.setText(self.tr("Multiple Boot Volumes found:")) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
986 | |
8096 | 987 | htmlText = self.tr( |
988 | "<h4>Multiple Boot Volumes were found</h4>" | |
989 | "<p>These volume paths were found.</p><ul><li>{0}</li></ul>" | |
990 | "<p>Please ensure that only one device of a type is ready for" | |
991 | " flashing. Press <b>Refresh</b> when ready.</p>" | |
992 | ).format("</li><li>".join(sorted(volumePaths))) | |
993 | self.infoEdit.setHtml(htmlText) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
994 | |
8096 | 995 | @pyqtSlot() |
996 | def on_flashButton_clicked(self): | |
997 | """ | |
998 | Private slot to flash the selected MicroPython or CircuitPython | |
999 | firmware onto the device. | |
1000 | """ | |
1001 | boardType = self.devicesComboBox.currentData(self.DeviceTypeRole) | |
1002 | firmwarePath = self.firmwarePicker.text() | |
1003 | volumePath = self.bootPicker.text() | |
1004 | if os.path.exists(firmwarePath) and os.path.exists(volumePath): | |
8111
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
1005 | if boardType == self.__manualType: |
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
1006 | self.infoLabel.setText(self.tr("Flashing Firmware")) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1007 | self.infoEdit.setHtml( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1008 | self.tr( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1009 | "<p>Flashing the selected firmware to the device. Please" |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1010 | " wait until the device resets automatically.</p>" |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1011 | ) |
8111
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
1012 | ) |
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
1013 | else: |
a8e9b387f701
UF2FlashDialog: added support for Raspberry Pi Pico.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8101
diff
changeset
|
1014 | firmwareType = SupportedUF2Boards[boardType]["firmware"] |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1015 | self.infoLabel.setText(self.tr("Flashing {0}").format(firmwareType)) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1016 | self.infoEdit.setHtml( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1017 | self.tr( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1018 | "<p>Flashing the {0} firmware to the device. Please wait" |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1019 | " until the device resets automatically.</p>" |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1020 | ).format(firmwareType) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1021 | ) |
8143
2c730d5fd177
Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8120
diff
changeset
|
1022 | QCoreApplication.processEvents( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1023 | QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1024 | ) |
10172 | 1025 | with contextlib.suppress(FileNotFoundError): |
1026 | shutil.copy(firmwarePath, volumePath) | |
8096 | 1027 | QThread.sleep(1) |
1028 | self.on_refreshButton_clicked() | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1029 | |
8096 | 1030 | @pyqtSlot() |
1031 | def on_refreshButton_clicked(self): | |
1032 | """ | |
1033 | Private slot to refresh the dialog. | |
1034 | """ | |
1035 | self.__populate() | |
9954 | 1036 | self.__updateFlashButton() |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1037 | |
8096 | 1038 | @pyqtSlot(int) |
1039 | def on_devicesComboBox_currentIndexChanged(self, index): | |
1040 | """ | |
1041 | Private slot to handle the selection of a board. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1042 | |
8096 | 1043 | @param index selected index |
1044 | @type int | |
1045 | """ | |
1046 | vidpid = self.devicesComboBox.itemData(index, self.DeviceVidPidRole) | |
1047 | boardType = self.devicesComboBox.itemData(index, self.DeviceTypeRole) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1048 | |
9815 | 1049 | self.searchBootButton.setEnabled(boardType == self.__manualType) |
8096 | 1050 | self.bootPicker.setEnabled(boardType == self.__manualType) |
1051 | if boardType == self.__manualType: | |
1052 | self.__showManualInstructions() | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1053 | |
8096 | 1054 | if vidpid is None: |
1055 | if boardType is None: | |
1056 | self.bootPicker.clear() | |
1057 | else: | |
1058 | volumes = SupportedUF2Boards[boardType]["volumes"][vidpid] | |
1059 | foundVolumes = [] | |
9903 | 1060 | for volume, _ in volumes: |
9624
b47dfa7a137d
Refactored the Utilities and Globals modules in order to enhance the maintainability.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9614
diff
changeset
|
1061 | foundVolumes += FileSystemUtilities.findVolume(volume, findAll=True) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1062 | |
8096 | 1063 | if len(foundVolumes) == 0: |
9903 | 1064 | self.__showNoVolumeInformation([v[0] for v in volumes], boardType) |
8096 | 1065 | self.bootPicker.clear() |
1066 | elif len(foundVolumes) == 1: | |
1067 | self.bootPicker.setText(foundVolumes[0]) | |
1068 | else: | |
9954 | 1069 | self.__showMultipleVolumesInformation(foundVolumes) |
8096 | 1070 | self.bootPicker.clear() |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1071 | |
8096 | 1072 | self.__updateFlashButton() |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1073 | |
8096 | 1074 | @pyqtSlot(str) |
1075 | def on_firmwarePicker_textChanged(self, text): | |
1076 | """ | |
1077 | Private slot handling a change of the firmware file. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1078 | |
8096 | 1079 | @param text current text of the firmware edit |
1080 | @type str | |
1081 | """ | |
1082 | self.__updateFlashButton() | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1083 | |
8096 | 1084 | @pyqtSlot(str) |
1085 | def on_bootPicker_textChanged(self, text): | |
1086 | """ | |
1087 | Private slot handling a change of the boot volume. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
1088 | |
8096 | 1089 | @param text current text of the boot volume edit |
1090 | @type str | |
1091 | """ | |
1092 | self.__updateFlashButton() | |
9815 | 1093 | |
1094 | @pyqtSlot() | |
1095 | def on_searchBootButton_clicked(self): | |
1096 | """ | |
1097 | Private slot to look for all known boot paths and present a list to select from. | |
1098 | """ | |
1099 | foundBootVolumes = set() | |
1100 | for boardType in SupportedUF2Boards: | |
1101 | for volumes in SupportedUF2Boards[boardType]["volumes"].values(): | |
9903 | 1102 | for volume, _ in volumes: |
9815 | 1103 | foundBootVolumes.update( |
1104 | FileSystemUtilities.findVolume(volume, findAll=True) | |
1105 | ) | |
1106 | ||
1107 | if len(foundBootVolumes) == 0: | |
1108 | selectedVolume = "" | |
9903 | 1109 | EricMessageBox.information( |
1110 | self, | |
1111 | self.tr("Flash UF2 Device"), | |
1112 | self.tr("""No UF2 device 'boot' volumes found."""), | |
1113 | ) | |
9815 | 1114 | elif len(foundBootVolumes) == 1: |
1115 | selectedVolume = list(foundBootVolumes)[0] | |
1116 | else: | |
1117 | result, ok = QInputDialog.getItem( | |
9903 | 1118 | self, |
9815 | 1119 | QCoreApplication.translate("UF2FlashDialog", "Flash UF2 Device"), |
1120 | QCoreApplication.translate( | |
1121 | "UF2FlashDialog", "Select the Boot Volume of the device:" | |
1122 | ), | |
1123 | list(foundBootVolumes), | |
9821
6b1b06d74532
Fixed some code formatting issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9815
diff
changeset
|
1124 | 0, |
6b1b06d74532
Fixed some code formatting issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9815
diff
changeset
|
1125 | True, |
9815 | 1126 | ) |
1127 | selectedVolume = result if ok else "" | |
1128 | ||
1129 | self.bootPicker.setText(selectedVolume) |