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