Tue, 06 Dec 2022 17:35:41 +0100
Corrected some 'wrong' string quotes caused by the Black line merging.
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
8881
54e42bc2437a
Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8762
diff
changeset
|
3 | # Copyright (c) 2019 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing some utility functions and the MicroPythonDevice base |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | class. |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | |
9496
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
11 | import contextlib |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
12 | import importlib |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | import logging |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
14 | import os |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | |
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
16 | from PyQt6.QtCore import QCoreApplication, QObject, pyqtSlot |
9482
a2bc06a54d9d
Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
17 | from PyQt6.QtSerialPort import QSerialPortInfo |
8318
962bce857696
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
18 | from PyQt6.QtWidgets import QInputDialog |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | |
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
20 | from eric7 import Preferences |
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:
9278
diff
changeset
|
21 | from eric7.EricGui import EricPixmapCache |
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
22 | from eric7.EricWidgets.EricApplication import ericApp |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | SupportedBoards = { |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | "esp": { |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | "ids": [ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
27 | (0x0403, 0x6001), # M5Stack ESP32 device"), |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
28 | (0x0403, 0x6001), # FT232/FT245 (XinaBox CW01, CW02) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
29 | (0x0403, 0x6010), # FT2232C/D/L/HL/Q (ESP-WROVER-KIT) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
30 | (0x0403, 0x6011), # FT4232 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
31 | (0x0403, 0x6014), # FT232H |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
32 | (0x0403, 0x6015), # Sparkfun ESP32 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
33 | (0x0403, 0x601C), # FT4222H |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
34 | (0x10C4, 0xEA60), # CP210x |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
35 | (0x1A86, 0x55D4), # CH343 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
36 | (0x1A86, 0x7523), # HL-340, CH340 |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | ], |
8079
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
38 | "description": "ESP32, ESP8266", |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | "icon": "esp32Device", |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
40 | "port_description": "", |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
41 | }, |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
42 | "circuitpython": { |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | "ids": [ |
9248 | 44 | (0x04D8, 0xE799), # Cytron Maker Zero SAMD21 |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
45 | (0x04D8, 0xEA2A), # BHDynamics DynaLoRa_USB |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
46 | (0x04D8, 0xEAD1), # BH Dynamics DynOSSAT-EDU-EPS-v1.0 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
47 | (0x04D8, 0xEAD2), # BH Dynamics DynOSSAT-EDU-OBC-v1.0 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
48 | (0x04D8, 0xEC44), # maholli PyCubed |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
49 | (0x04D8, 0xEC63), # Kevin Neubauer CircuitBrains Basic |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
50 | (0x04D8, 0xEC64), # Kevin Neubauer CircuitBrains Deluxe |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
51 | (0x04D8, 0xEC72), # XinaBox CC03 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
52 | (0x04D8, 0xEC75), # XinaBox CS11 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
53 | (0x04D8, 0xED5F), # Itaca Innovation uChip CircuitPython |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
54 | (0x04D8, 0xED94), # maholli kicksat-sprite |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
55 | (0x04D8, 0xEDB3), # Capable Robot Programmable USB Hub |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
56 | (0x04D8, 0xEDBE), # maholli SAM32 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
57 | (0x04D8, 0xEE8C), # J&J Studios LLC datum-Distance |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
58 | (0x04D8, 0xEE8D), # J&J Studios LLC datum-IMU |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
59 | (0x04D8, 0xEE8E), # J&J Studios LLC datum-Light |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
60 | (0x04D8, 0xEE8F), # J&J Studios LLC datum-Weather |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
61 | (0x04D8, 0xEF67), # senseBox MCU |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
62 | (0x054C, 0x0BC2), # Sony Spresense |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
63 | (0x1209, 0x2017), # Benjamin Shockley Mini SAM M4 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
64 | (0x1209, 0x3141), # CrumpSpace CrumpS2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
65 | (0x1209, 0x3252), # Targett Module Clip w/Wroom |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
66 | (0x1209, 0x3253), # Targett Module Clip w/Wrover |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
67 | (0x1209, 0x4D43), # Robotics Masters Robo HAT MM1 M4 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
68 | (0x1209, 0x4DDD), # ODT CP Sapling |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
69 | (0x1209, 0x4DDE), # ODT CP Sapling M0 w/ SPI Flash |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
70 | (0x1209, 0x4DDF), # ODT CP Sapling Rev B |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
71 | (0x1209, 0x4DF0), # Oak Dev Tech Pixelwing ESP32S2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
72 | (0x1209, 0x4DF1), # Oak Dev Tech BREAD2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
73 | (0x1209, 0x4DF2), # Oak Dev Tech CAST AWAY RP2040 |
9248 | 74 | (0x1209, 0x5A52), # ZRichard RP2.65-F |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
75 | (0x1209, 0x5BF0), # Foosn Fomu |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
76 | (0x1209, 0x7150), # Electronic Cats Hunter Cat NFC |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
77 | (0x1209, 0x7382), # Invector Labs AB iLabs Challenger 840 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
78 | (0x1209, 0x805A), # Electronic Cats BastBLE |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
79 | (0x1209, 0xA182), # Solder Party RP2040 Stamp |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
80 | (0x1209, 0xBAB0), # Electronic Cats Bast WiFi |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
81 | (0x1209, 0xBAB1), # Electronic Cats Meow Meow |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
82 | (0x1209, 0xBAB2), # Electronic Cats CatWAN USBStick |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
83 | (0x1209, 0xBAB3), # Electronic Cats Bast Pro Mini M0 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
84 | (0x1209, 0xBAB6), # Electronic Cats Escornabot Makech |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
85 | (0x1209, 0xBAB8), # Electronic Cats NFC Copy Cat |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
86 | (0x1209, 0xC051), # Betrusted Simmel |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
87 | (0x1209, 0xD10D), # Diodes Delight Piunora |
9248 | 88 | (0x1209, 0xD1B5), # Radomir Dopieralski PewPew LCD |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
89 | (0x1209, 0xE3E3), # StackRduino M0 PRO |
9248 | 90 | (0x1209, 0xF123), # Electrolama minik |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
91 | (0x1209, 0xF500), # Silicognition LLC M4-Shim |
9248 | 92 | (0x1209, 0xF502), # Silicognition LLC RP2040-Shim |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
93 | (0x16D0, 0x08C6), # Pimoroni Keybow 2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
94 | (0x16D0, 0x08C7), # Pimoroni Tiny 2040 (8MB) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
95 | (0x16D0, 0x08C8), # Pimoroni PicoSystem |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
96 | (0x1915, 0xB001), # Makerdiary Pitaya Go |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
97 | (0x192F, 0xB1B2), # WarmBit BluePixel nRF52840 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
98 | (0x1B4F, 0x0015), # SparkFun RedBoard Turbo Board |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
99 | (0x1B4F, 0x0016), # SparkFun SAMD51 Thing+ |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
100 | (0x1B4F, 0x0017), # SparkFun LUMIDrive Board |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
101 | (0x1B4F, 0x0020), # SparkFun MicroMod SAMD51 Processor |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
102 | (0x1B4F, 0x0021), # SparkFun MicroMod nRF52840 Processor |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
103 | (0x1B4F, 0x0024), # SparkFun MicroMod RP2040 Processor |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
104 | (0x1B4F, 0x0025), # SparkFun Thing Plus RP2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
105 | (0x1B4F, 0x0026), # SparkFun Pro Micro RP2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
106 | (0x1B4F, 0x0027), # SparkFun STM32 MicroMod Processor |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
107 | (0x1B4F, 0x0028), # SparkFun Thing Plus - STM32 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
108 | (0x1B4F, 0x002E), # PJRC/Sparkfun Teensy MicroMod |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
109 | (0x1B4F, 0x5289), # SparkFun SFE_nRF52840_Mini |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
110 | (0x1B4F, 0x8D22), # SparkFun SAMD21 Mini Breakout |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
111 | (0x1B4F, 0x8D23), # SparkFun SAMD21 Dev Breakout |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
112 | (0x1B4F, 0x8D24), # SparkFun Qwiic Micro |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
113 | (0x1D50, 0x60E8), # Radomir Dopieralski PewPew M4 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
114 | (0x1D50, 0x6152), # nrf52.jpconstantineau.com BlueMicro833 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
115 | (0x1D50, 0x6153), # JPConstantineau PyKey18 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
116 | (0x1D50, 0x6153), # JPConstantineau PyKey44 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
117 | (0x1D50, 0x6153), # JPConstantineau PyKey60 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
118 | (0x1D50, 0x6153), # JPConstantineau PyKey87 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
119 | (0x1D50, 0x6154), # JPConstantineau EncoderPad RP2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
120 | (0x1D50, 0x6161), # nrf52.jpconstantineau.com BlueMicro840 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
121 | (0x2341, 0x8053), # Arduino MKR1300 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
122 | (0x2341, 0x8057), # Arduino Nano 33 IoT |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
123 | (0x2341, 0x805A), # Arduino Arduino_Nano_33_BLE |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
124 | (0x2341, 0x824D), # Arduino Zero |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
125 | (0x2786, 0x9207), # Switch Sc. BLE-SS dev board Multi Sensor |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
126 | (0x2786, 0x920D), # Switch Sc. SSCI ISP1807 Dev Board |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
127 | (0x2786, 0x920F), # Switch Sc. SSCI ISP1807 Micro Board |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
128 | (0x2886, 0x002F), # Seeed Seeeduino XIAO |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
129 | (0x2886, 0x0042), # Seeed Seeeduino XIAO RP2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
130 | (0x2886, 0x0045), # Seeed XIAO nRF52840 Sense |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
131 | (0x2886, 0x802D), # Seeed Seeeduino Wio Terminal |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
132 | (0x2886, 0x802F), # Seeed Seeeduino XIAO KB |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
133 | (0x2886, 0xF001), # Makerdiary nRF52840 M.2 Developer Kit |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
134 | (0x2886, 0xF002), # Makerdiary M60 Keyboard |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
135 | (0x2B04, 0xC00C), # Particle Argon |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
136 | (0x2B04, 0xC00D), # Particle Boron |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
137 | (0x2B04, 0xC00E), # Particle Xenon |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
138 | (0x2E8A, 0x1000), # Cytron Maker Pi RP2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
139 | (0x2E8A, 0x1002), # Pimoroni Pico LiPo (4MB) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
140 | (0x2E8A, 0x1003), # Pimoroni Pico LiPo (16MB) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
141 | (0x2E8A, 0x1005), # Melopero Shake RP2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
142 | (0x2E8A, 0x1006), # Invector Labs Challenger RP2040 WiFi |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
143 | (0x2E8A, 0x1008), # Pimoroni PGA2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
144 | (0x2E8A, 0x1009), # Pimoroni Interstate 75 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
145 | (0x2E8A, 0x100A), # Pimoroni Plasma 2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
146 | (0x2E8A, 0x100B), # Invector Labs Challenger RP2040 LTE |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
147 | (0x2E8A, 0x100D), # Invector Labs Challenger NB RP2040 WiFi |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
148 | (0x2E8A, 0x100E), # Raspberry Pi Zero |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
149 | (0x2E8A, 0x100F), # Cytron Maker Nano RP2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
150 | (0x2E8A, 0x1012), # Raspberry Pi Compute Module 4 IO Board |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
151 | (0x2E8A, 0x1013), # Raspberry Pi 4B |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
152 | (0x2E8A, 0x1014), # Raspberry Pi Compute Module 4 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
153 | (0x2E8A, 0x1015), # Raspberry Pi Zero 2W |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
154 | (0x2E8A, 0x1016), # Pimoroni Tiny 2040 (2MB) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
155 | (0x2E8A, 0x1019), # Pimoroni Motor 2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
156 | (0x2E8A, 0x101A), # Pimoroni Servo 2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
157 | (0x2E8A, 0x101B), # Pimoroni Badger 2040 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
158 | (0x2E8A, 0x101E), # Raspberry Pi Zero W |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
159 | (0x2E8A, 0x101F), # Waveshare Electronics RP2040-Zero |
9248 | 160 | (0x2E8A, 0x1023), # Invector Labs Challenger RP2040 LoRa |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
161 | (0x2E8A, 0x1026), # ELECFREAKS Pico:ed |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
162 | (0x2E8A, 0x1027), # WIZnet W5100S-EVB-Pico |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
163 | (0x303A, 0x7001), # Espressif ESP32-S2-HMI-DevKit-1 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
164 | (0x303A, 0x7003), # Espressif ESP32-S3-DevKitC-1 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
165 | (0x303A, 0x7003), # Espressif ESP32-S3-DevKitC-1-N8 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
166 | (0x303A, 0x7003), # Espressif ESP32-S3-DevKitC-1-N8R2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
167 | (0x303A, 0x7003), # Espressif ESP32-S3-DevKitC-1-N8R8 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
168 | (0x303A, 0x7003), # Espressif ESP32-S3-DevKitC-1-nopsram |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
169 | (0x303A, 0x7005), # Espressif ESP32-S3-Box-2.5 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
170 | (0x303A, 0x7007), # Espressif ESP32-S3-DevKitM-1-N8 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
171 | (0x303A, 0x7009), # Espressif ESP32-S2-DevKitC-1-N4 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
172 | (0x303A, 0x7009), # Espressif ESP32-S2-DevKitC-1-N4R2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
173 | (0x303A, 0x700B), # Espressif ESP32-S3-USB-OTG-N8 |
9248 | 174 | (0x303A, 0x700D), # Espressif ESP32-S3-Box-Lite |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
175 | (0x303A, 0x8002), # UnexpectedMaker TinyS2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
176 | (0x303A, 0x8007), # LILYGO TTGO T8 ESP32-S2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
177 | (0x303A, 0x800D), # Gravitech Cucumber RS |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
178 | (0x303A, 0x80A1), # Gravitech Cucumber R |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
179 | (0x303A, 0x80A4), # Gravitech Cucumber M |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
180 | (0x303A, 0x80A7), # Gravitech Cucumber MS |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
181 | (0x303A, 0x80AA), # Espressif Franzininho WIFI w/Wroom |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
182 | (0x303A, 0x80AD), # Espressif Franzininho WIFI w/Wrover |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
183 | (0x303A, 0x80AF), # Artisense Reference Design RD00 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
184 | (0x303A, 0x80B2), # Muselab nanoESP32-S2 w/Wrover |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
185 | (0x303A, 0x80B5), # UnexpectedMaker FeatherS2 Neo |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
186 | (0x303A, 0x80B7), # MORPHEANS MORPHESP-240 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
187 | (0x303A, 0x80C3), # Lolin S2 Mini |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
188 | (0x303A, 0x80C6), # Lolin S2 Pico |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
189 | (0x303A, 0x80D1), # UnexpectedMaker TinyS3 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
190 | (0x303A, 0x80D4), # UnexpectedMaker ProS3 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
191 | (0x303A, 0x80D7), # UnexpectedMaker FeatherS3 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
192 | (0x303A, 0x80D9), # FutureKeys HexKy_S2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
193 | (0x303A, 0x80E8), # HiiBot IoTs2 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
194 | (0x303A, 0x80EA), # LILYGO TTGO T8 ESP32-S2-WROOM |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
195 | (0x303A, 0x80ED), # LILYGO TTGO T8 ESP32-S2 |
9248 | 196 | (0x303A, 0x80F9), # Cytron Maker Feather AIoT S3 |
197 | (0x303A, 0x80FC), # Espressif MixGo CE | |
198 | (0x303A, 0x80FD), # Espressif MixGo CE | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
199 | (0x30A4, 0x0002), # Blues Inc. Swan R5 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
200 | (0x3171, 0x0101), # 8086.net Commander |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
201 | (0x31E2, 0x2001), # BDMICRO LLC VINA-D21 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
202 | (0x31E2, 0x2011), # BDMICRO LLC VINA-D51 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
203 | (0x31E2, 0x2021), # BDMICRO LLC VINA-D51 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
204 | (0x32BD, 0x3001), # Alorium Tech. AloriumTech Evo M51 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
205 | (0x4097, 0x0001), # TG-Boards Datalore IP M4 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
206 | (0x612B, 0x80A7), # Ai-Thinker ESP 12k NodeMCU |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
207 | (0x239A, None), # Any Adafruit Boards |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
208 | ], |
8055
52fdd41517f3
MicroPython: made the value shown in the deveice selection list more descriptive.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8051
diff
changeset
|
209 | "description": "CircuitPython", |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
210 | "icon": "circuitPythonDevice", |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
211 | "port_description": "", |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
212 | }, |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
213 | "bbc_microbit": { |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
214 | "ids": [ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
215 | (0x0D28, 0x0204), # micro:bit |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
216 | ], |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
217 | "description": "BBC micro:bit", |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
218 | "icon": "microbitDevice", |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
219 | "port_description": "BBC micro:bit CMSIS-DAP", |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
220 | }, |
7549
fcfbb9e94471
MicroPython: continued implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
221 | "calliope": { |
fcfbb9e94471
MicroPython: continued implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
222 | "ids": [ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
223 | (0x0D28, 0x0204), # Calliope mini |
7549
fcfbb9e94471
MicroPython: continued implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
224 | ], |
fcfbb9e94471
MicroPython: continued implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
225 | "description": "Calliope mini", |
fcfbb9e94471
MicroPython: continued implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
226 | "icon": "calliope_mini", |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
227 | "port_description": "DAPLink CMSIS-DAP", |
7549
fcfbb9e94471
MicroPython: continued implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
228 | }, |
7295
cf50045a7c0f
MicroPython: added support for PyBoard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
229 | "pyboard": { |
cf50045a7c0f
MicroPython: added support for PyBoard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
230 | "ids": [ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
231 | (0xF055, 0x9800), # Pyboard in CDC mode |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
232 | (0xF055, 0x9801), # Pyboard in CDC+HID mode |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
233 | (0xF055, 0x9802), # Pyboard in CDC+MSC mode |
7295
cf50045a7c0f
MicroPython: added support for PyBoard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
234 | ], |
cf50045a7c0f
MicroPython: added support for PyBoard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
235 | "description": "PyBoard", |
cf50045a7c0f
MicroPython: added support for PyBoard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
236 | "icon": "micropython48", |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
237 | "port_description": "", |
7549
fcfbb9e94471
MicroPython: continued implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
238 | }, |
8122 | 239 | "rp2040": { |
240 | "ids": [ | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
241 | (0x2E8A, 0x0005), # Raspberry Pi Pico |
8122 | 242 | ], |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
243 | "description": QCoreApplication.translate("MicroPythonDevice", "RP2040 based"), |
8122 | 244 | "icon": "rp2040Device", |
245 | "port_description": "", | |
246 | }, | |
8079
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
247 | "generic": { |
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
248 | # only manually configured devices use this |
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
249 | "ids": [], |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
250 | "description": QCoreApplication.translate("MicroPythonDevice", "Generic Board"), |
8079
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
251 | "icon": "micropython48", |
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
252 | "port_description": "", |
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
253 | }, |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
254 | } |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
255 | |
7787
9ede0dcfc2ac
MicroPythonDevices: added a list of device to be ignored by default.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7780
diff
changeset
|
256 | IgnoredBoards = ( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
257 | (0x8086, 0x9C3D), |
8762
49d93d0069af
MicroPython: added '(0x8086, None)' to the list of ignores boards as it is used for some 8086 related chips.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8508
diff
changeset
|
258 | (0x8086, None), |
7787
9ede0dcfc2ac
MicroPythonDevices: added a list of device to be ignored by default.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7780
diff
changeset
|
259 | ) |
9ede0dcfc2ac
MicroPythonDevices: added a list of device to be ignored by default.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7780
diff
changeset
|
260 | |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
261 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
262 | def getSupportedDevices(): |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
263 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
264 | Function to get a list of supported MicroPython devices. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
265 | |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
266 | @return set of tuples with the board type and description |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
267 | @rtype set of tuples of (str, str) |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
268 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
269 | boards = [] |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
270 | for board in SupportedBoards: |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
271 | boards.append((board, SupportedBoards[board]["description"])) |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
272 | return boards |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
273 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
274 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
275 | def getFoundDevices(): |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
276 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
277 | Function to check the serial ports for supported MicroPython devices. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
278 | |
8096 | 279 | @return tuple containing a list of tuples with the board type, the port |
280 | description, a description, the serial port it is connected at, the | |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8133
diff
changeset
|
281 | VID and PID for known device types, a list of tuples with VID, PID |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8133
diff
changeset
|
282 | and description for unknown devices and a list of tuples with VID, |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8133
diff
changeset
|
283 | PID, description and port name for ports with missing VID or PID |
8096 | 284 | @rtype tuple of (list of tuples of (str, str, str, str, int, int), |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8133
diff
changeset
|
285 | list of tuples of (int, int, str), |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8133
diff
changeset
|
286 | list of tuples of (int, int, str, str) |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
287 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
288 | foundDevices = [] |
7588
881eebfefd34
MicroPython: added code to report detected non-supported devices to the user asking to report them.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7549
diff
changeset
|
289 | unknownDevices = [] |
8133
4d1d1c248f79
MicroPython: started adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8122
diff
changeset
|
290 | unknownPorts = [] |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
291 | |
8079
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
292 | manualDevices = {} |
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
293 | for deviceDict in Preferences.getMicroPython("ManualDevices"): |
331e717c458e
MicroPython: added capability to manually configure devices not yet known by eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8072
diff
changeset
|
294 | manualDevices[(deviceDict["vid"], deviceDict["pid"])] = deviceDict |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
295 | |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
296 | availablePorts = QSerialPortInfo.availablePorts() |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
297 | for port in availablePorts: |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
298 | if port.hasVendorIdentifier() and port.hasProductIdentifier(): |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
299 | supported = False |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
300 | vid = port.vendorIdentifier() |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
301 | pid = port.productIdentifier() |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
302 | |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
303 | for board in SupportedBoards: |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
304 | if (vid, pid) in SupportedBoards[board]["ids"] or ( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
305 | vid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
306 | None, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
307 | ) in SupportedBoards[board]["ids"]: |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
308 | if board in ("bbc_microbit", "calliope") and ( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
309 | port.description().strip() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
310 | != SupportedBoards[board]["port_description"] |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
311 | ): |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
312 | # both boards have the same VID and PID |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
313 | # try to differentiate based on port description |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
314 | continue |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
315 | foundDevices.append( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
316 | ( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
317 | board, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
318 | port.description(), |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
319 | SupportedBoards[board]["description"], |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
320 | port.portName(), |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
321 | vid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
322 | pid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
323 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
324 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
325 | supported = True |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
326 | if not supported and (vid, pid) in manualDevices: |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
327 | # check the locally added ones next |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
328 | board = manualDevices[(vid, pid)]["type"] |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
329 | foundDevices.append( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
330 | ( |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
331 | board, |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
332 | port.description(), |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
333 | SupportedBoards[board]["description"], |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
334 | port.portName(), |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
335 | vid, |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
336 | pid, |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
337 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
338 | ) |
7588
881eebfefd34
MicroPython: added code to report detected non-supported devices to the user asking to report them.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7549
diff
changeset
|
339 | supported = True |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
340 | if not supported: |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
341 | if vid and pid: |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
342 | if (vid, pid) not in IgnoredBoards and ( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
343 | vid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
344 | None, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
345 | ) not in IgnoredBoards: |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
346 | unknownDevices.append((vid, pid, port.description())) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
347 | logging.debug( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
348 | "Unknown device: (0x%04x:0x%04x %s)", |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
349 | vid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
350 | pid, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
351 | port.description(), |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
352 | ) |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
353 | else: |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
354 | # either VID or PID or both not detected |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
355 | desc = port.description() |
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
356 | if not desc: |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
357 | desc = QCoreApplication.translate( |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
358 | "MicroPythonDevice", "Unknown Device" |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
359 | ) |
8508
fbd629e65477
MicroPython: modified the code to be used with PyQt 6.2 (Qt 6.2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8462
diff
changeset
|
360 | unknownPorts.append((vid, pid, desc, port.portName())) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
361 | |
9498 | 362 | elif bool(port.portName()) and Preferences.getMicroPython( |
363 | "EnableManualDeviceSelection" | |
364 | ): | |
9270 | 365 | # no VID and/or PID available (e.g. in Linux container of ChromeOS) |
366 | desc = port.description() | |
367 | if not desc: | |
9278
36448ca469c2
Simplified some code iaw. recommendations of the extended style checker and reformatted the code with black.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9270
diff
changeset
|
368 | desc = QCoreApplication.translate("MicroPythonDevice", "Unknown Device") |
9270 | 369 | unknownPorts.append((0, 0, desc, port.portName())) |
370 | ||
8133
4d1d1c248f79
MicroPython: started adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8122
diff
changeset
|
371 | return foundDevices, unknownDevices, unknownPorts |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
372 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
373 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
374 | def getDeviceIcon(boardName, iconFormat=True): |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
375 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
376 | Function to get the icon for the given board. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
377 | |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
378 | @param boardName name of the board |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
379 | @type str |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
380 | @param iconFormat flag indicating to get an icon or a pixmap |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
381 | @type bool |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
382 | @return icon for the board (iconFormat == True) or |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
383 | a pixmap (iconFormat == False) |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
384 | @rtype QIcon or QPixmap |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
385 | """ |
8259
2bbec88047dd
Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8222
diff
changeset
|
386 | iconName = ( |
2bbec88047dd
Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8222
diff
changeset
|
387 | SupportedBoards[boardName]["icon"] |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
388 | if boardName in SupportedBoards |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
389 | else |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
390 | # return a generic MicroPython icon |
8259
2bbec88047dd
Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8222
diff
changeset
|
391 | "micropython48" |
2bbec88047dd
Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8222
diff
changeset
|
392 | ) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
393 | |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
394 | if iconFormat: |
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:
9278
diff
changeset
|
395 | return EricPixmapCache.getIcon(iconName) |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
396 | else: |
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:
9278
diff
changeset
|
397 | return EricPixmapCache.getPixmap(iconName) |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
398 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
399 | |
8082
2242a6a1d786
MicroPython: added support for a generic MicroPython device where the user can configure the relevant paramaters through the 'Unknown Devices' dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8079
diff
changeset
|
400 | def getDevice(deviceType, microPythonWidget, vid, pid): |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
401 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
402 | Public method to instantiate a specific MicroPython device interface. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
403 | |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
404 | @param deviceType type of the device interface |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
405 | @type str |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
406 | @param microPythonWidget reference to the main MicroPython widget |
7134
21d23ca51680
Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7129
diff
changeset
|
407 | @type MicroPythonWidget |
8082
2242a6a1d786
MicroPython: added support for a generic MicroPython device where the user can configure the relevant paramaters through the 'Unknown Devices' dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8079
diff
changeset
|
408 | @param vid vendor ID (only used for deviceType 'generic') |
2242a6a1d786
MicroPython: added support for a generic MicroPython device where the user can configure the relevant paramaters through the 'Unknown Devices' dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8079
diff
changeset
|
409 | @type int |
2242a6a1d786
MicroPython: added support for a generic MicroPython device where the user can configure the relevant paramaters through the 'Unknown Devices' dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8079
diff
changeset
|
410 | @param pid product ID (only used for deviceType 'generic') |
2242a6a1d786
MicroPython: added support for a generic MicroPython device where the user can configure the relevant paramaters through the 'Unknown Devices' dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8079
diff
changeset
|
411 | @type int |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
412 | @return instantiated device interface |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
413 | @rtype MicroPythonDevice |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
414 | """ |
9496
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
415 | deviceMapping = { |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
416 | "bbc_microbit": ".MicrobitDevices", |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
417 | "calliope": ".MicrobitDevices", |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
418 | "circuitpython": ".CircuitPythonDevices", |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
419 | "esp": ".EspDevices", |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
420 | "generic": ".GenericMicroPythonDevices", |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
421 | "pyboard": ".PyBoardDevices", |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
422 | "rp2040": ".RP2040Devices", |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
423 | } |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
424 | |
9496
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
425 | with contextlib.suppress(KeyError): |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
426 | mod = importlib.import_module(deviceMapping[deviceType], __package__) |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
427 | if mod: |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
428 | return mod.createDevice(microPythonWidget, deviceType, vid, pid) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
429 | |
9496
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
430 | # nothing specific requested or specific one failed or is not supported yet |
05017f795c24
Changed MicroPython device imports to use importlib.import_module().
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9482
diff
changeset
|
431 | return MicroPythonDevice(microPythonWidget, deviceType) |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
432 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
433 | |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
434 | class MicroPythonDevice(QObject): |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
435 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
436 | Base class for the more specific MicroPython devices. |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
437 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
438 | |
8117
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
439 | def __init__(self, microPythonWidget, deviceType, parent=None): |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
440 | """ |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
441 | Constructor |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
442 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
443 | @param microPythonWidget reference to the main MicroPython widget |
7134
21d23ca51680
Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7129
diff
changeset
|
444 | @type MicroPythonWidget |
8117
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
445 | @param deviceType device type assigned to this device interface |
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
446 | @type str |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
447 | @param parent reference to the parent object |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
448 | @type QObject |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
449 | """ |
8218
7c09585bd960
Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
450 | super().__init__(parent) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
451 | |
8117
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
452 | self._deviceType = deviceType |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
453 | self.microPython = microPythonWidget |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
454 | |
8117
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
455 | def getDeviceType(self): |
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
456 | """ |
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
457 | Public method to get the device type. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
458 | |
8117
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
459 | @return type of the device |
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
460 | @rtype str |
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
461 | """ |
aaa5e0eacd4e
MicroPython: changed the logic to synchronize the time because some devices don't implement long integer and failed defining the 'set_time()' function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8096
diff
changeset
|
462 | return self._deviceType |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
463 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
464 | def setButtons(self): |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
465 | """ |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
466 | Public method to enable the supported action buttons. |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
467 | """ |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
468 | self.microPython.setActionButtons( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
469 | open=False, save=False, run=False, repl=False, files=False, chart=False |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
470 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
471 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
472 | def forceInterrupt(self): |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
473 | """ |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
474 | Public method to determine the need for an interrupt when opening the |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
475 | serial connection. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
476 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
477 | @return flag indicating an interrupt is needed |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
478 | @rtype bool |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
479 | """ |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
480 | return True |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
481 | |
7125
2028553ee58c
CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7123
diff
changeset
|
482 | def deviceName(self): |
2028553ee58c
CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7123
diff
changeset
|
483 | """ |
2028553ee58c
CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7123
diff
changeset
|
484 | Public method to get the name of the device. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
485 | |
7125
2028553ee58c
CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7123
diff
changeset
|
486 | @return name of the device |
2028553ee58c
CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7123
diff
changeset
|
487 | @rtype str |
2028553ee58c
CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7123
diff
changeset
|
488 | """ |
2028553ee58c
CircuitPythonDevices, EspDevices, MicroPythonDevices: added a method to get the device name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7123
diff
changeset
|
489 | return self.tr("Unsupported Device") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
490 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
491 | def canStartRepl(self): |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
492 | """ |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
493 | Public method to determine, if a REPL can be started. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
494 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
495 | @return tuple containing a flag indicating it is safe to start a REPL |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
496 | and a reason why it cannot. |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
497 | @rtype tuple of (bool, str) |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
498 | """ |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
499 | return False, self.tr("REPL is not supported by this device.") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
500 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
501 | def setRepl(self, on): |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
502 | """ |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
503 | Public method to set the REPL status and dependent status. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
504 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
505 | @param on flag indicating the active status |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
506 | @type bool |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
507 | """ |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
508 | pass |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
509 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
510 | def canStartPlotter(self): |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
511 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
512 | Public method to determine, if a Plotter can be started. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
513 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
514 | @return tuple containing a flag indicating it is safe to start a |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
515 | Plotter and a reason why it cannot. |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
516 | @rtype tuple of (bool, str) |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
517 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
518 | return False, self.tr("Plotter is not supported by this device.") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
519 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
520 | def setPlotter(self, on): |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
521 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
522 | Public method to set the Plotter status and dependent status. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
523 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
524 | @param on flag indicating the active status |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
525 | @type bool |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
526 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
527 | pass |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
528 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
529 | def canRunScript(self): |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
530 | """ |
7091
84d2a73b448a
EspDevices, MicroPythonDevices: fixed a wrong source docu string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7082
diff
changeset
|
531 | Public method to determine, if a script can be executed. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
532 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
533 | @return tuple containing a flag indicating it is safe to start a |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
534 | Plotter and a reason why it cannot. |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
535 | @rtype tuple of (bool, str) |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
536 | """ |
9576
be9f8e7e42e0
Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9498
diff
changeset
|
537 | return False, self.tr("Running scripts is not supported by this device.") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
538 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
539 | def runScript(self, script): |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
540 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
541 | Public method to run the given Python script. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
542 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
543 | @param script script to be executed |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
544 | @type str |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
545 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
546 | pass |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
547 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
548 | def canStartFileManager(self): |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
549 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
550 | Public method to determine, if a File Manager can be started. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
551 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
552 | @return tuple containing a flag indicating it is safe to start a |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
553 | File Manager and a reason why it cannot. |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
554 | @rtype tuple of (bool, str) |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
555 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
556 | return False, self.tr("File Manager is not supported by this device.") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
557 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
558 | def setFileManager(self, on): |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
559 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
560 | Public method to set the File Manager status and dependent status. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
561 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
562 | @param on flag indicating the active status |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
563 | @type bool |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
564 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
565 | pass |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
566 | |
7129
3cc19aec959a
MicroPythonDevicces: added a method to indicate that a device allows access to its file system via a local directory.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7125
diff
changeset
|
567 | def supportsLocalFileAccess(self): |
3cc19aec959a
MicroPythonDevicces: added a method to indicate that a device allows access to its file system via a local directory.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7125
diff
changeset
|
568 | """ |
3cc19aec959a
MicroPythonDevicces: added a method to indicate that a device allows access to its file system via a local directory.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7125
diff
changeset
|
569 | Public method to indicate file access via a local directory. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
570 | |
7129
3cc19aec959a
MicroPythonDevicces: added a method to indicate that a device allows access to its file system via a local directory.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7125
diff
changeset
|
571 | @return flag indicating file access via local directory |
7145
ceb3e8b242c1
Regenerated source docu after merge with 'micropython' branch.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7134
diff
changeset
|
572 | @rtype bool |
7129
3cc19aec959a
MicroPythonDevicces: added a method to indicate that a device allows access to its file system via a local directory.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7125
diff
changeset
|
573 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
574 | return False # default |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
575 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
576 | def getWorkspace(self): |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
577 | """ |
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
578 | Public method to get the workspace directory. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
579 | |
7058
bdd583f96e96
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7054
diff
changeset
|
580 | @return workspace directory used for saving files |
7054
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
581 | @rtype str |
fb84d8489bc1
Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
582 | """ |
8067
a467ab075be0
MicroPython: added buttons to go to the 'home' directory (local and on device) to the MicroPython file manager and improved the workspace handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8062
diff
changeset
|
583 | return ( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
584 | Preferences.getMicroPython("MpyWorkspace") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
585 | or Preferences.getMultiProject("Workspace") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
586 | or os.path.expanduser("~") |
8067
a467ab075be0
MicroPython: added buttons to go to the 'home' directory (local and on device) to the MicroPython file manager and improved the workspace handling.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8062
diff
changeset
|
587 | ) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
588 | |
8062
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
589 | def selectDeviceDirectory(self, deviceDirectories): |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
590 | """ |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
591 | Public method to select the device directory from a list of detected |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
592 | ones. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
593 | |
8062
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
594 | @param deviceDirectories list of directories to select from |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
595 | @type list of str |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
596 | @return selected directory or an empty string |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
597 | @rtype str |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
598 | """ |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
599 | deviceDirectory, ok = QInputDialog.getItem( |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
600 | None, |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
601 | self.tr("Select Device Directory"), |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
602 | self.tr("Select the directory for the connected device:"), |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
603 | [""] + deviceDirectories, |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
604 | 0, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
605 | False, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
606 | ) |
8062
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
607 | if ok: |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
608 | return deviceDirectory |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
609 | else: |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
610 | # user cancelled |
8dc5acb30a8b
MicroPython: implemented code to deal with multiple devices attached to the computer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8055
diff
changeset
|
611 | return "" |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
612 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
613 | def sendCommands(self, commandsList): |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
614 | """ |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
615 | Public method to send a list of commands to the device. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
616 | |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
617 | @param commandsList list of commands to be sent to the device |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
618 | @type list of str |
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
619 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
620 | rawOn = [ # sequence of commands to enter raw mode |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
621 | b"\x02", # Ctrl-B: exit raw repl (just in case) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
622 | b"\r\x03\x03\x03", # Ctrl-C three times: interrupt any running |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
623 | # program |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
624 | b"\r\x01", # Ctrl-A: enter raw REPL |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
625 | ] |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
626 | newLine = [ |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
627 | b'print("\\n")\r', |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
628 | ] |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
629 | commands = [c.encode("utf-8)") + b"\r" for c in commandsList] |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
630 | commands.append(b"\r") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
631 | commands.append(b"\x04") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
632 | rawOff = [b"\x02", b"\x02"] |
7059
a8fad276cbd5
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7058
diff
changeset
|
633 | commandSequence = rawOn + newLine + commands + rawOff |
7095
8e10acb1cd85
Refactored and improved the MicroPython code to be able to show the file manager and the REPL simultaneously.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7091
diff
changeset
|
634 | self.microPython.commandsInterface().executeAsync(commandSequence) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
635 | |
7065
e3d04faced34
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7061
diff
changeset
|
636 | @pyqtSlot() |
e3d04faced34
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7061
diff
changeset
|
637 | def handleDataFlood(self): |
e3d04faced34
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7061
diff
changeset
|
638 | """ |
e3d04faced34
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7061
diff
changeset
|
639 | Public slot handling a data floof from the device. |
e3d04faced34
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7061
diff
changeset
|
640 | """ |
e3d04faced34
Continued implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7061
diff
changeset
|
641 | pass |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
642 | |
7108
4f6133a01c6a
Started rearranging menu structure and testing and fixing on CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7095
diff
changeset
|
643 | def addDeviceMenuEntries(self, menu): |
7082
ec199ef0cfc6
MicroPython: continued implementing the file manager widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7068
diff
changeset
|
644 | """ |
ec199ef0cfc6
MicroPython: continued implementing the file manager widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7068
diff
changeset
|
645 | Public method to add device specific entries to the given menu. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
646 | |
7082
ec199ef0cfc6
MicroPython: continued implementing the file manager widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7068
diff
changeset
|
647 | @param menu reference to the context menu |
ec199ef0cfc6
MicroPython: continued implementing the file manager widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7068
diff
changeset
|
648 | @type QMenu |
ec199ef0cfc6
MicroPython: continued implementing the file manager widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7068
diff
changeset
|
649 | """ |
ec199ef0cfc6
MicroPython: continued implementing the file manager widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7068
diff
changeset
|
650 | pass |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
651 | |
8096 | 652 | def hasFlashMenuEntry(self): |
653 | """ | |
654 | Public method to check, if the device has its own flash menu entry. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
655 | |
8096 | 656 | @return flag indicating a specific flash menu entry |
657 | @rtype bool | |
658 | """ | |
659 | return False | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
660 | |
7123
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
661 | def hasTimeCommands(self): |
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
662 | """ |
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
663 | Public method to check, if the device supports time commands. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
664 | |
7123
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
665 | The default returns True. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
666 | |
7123
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
667 | @return flag indicating support for time commands |
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
668 | @rtype bool |
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
669 | """ |
94948e2aa0a5
Implemented the support for the 'BBC micro:bit' device.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7108
diff
changeset
|
670 | return True |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
671 | |
7161
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
672 | def hasDocumentationUrl(self): |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
673 | """ |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
674 | Public method to check, if the device has a configured documentation |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
675 | URL. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
676 | |
7161
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
677 | @return flag indicating a configured documentation URL |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
678 | @rtype bool |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
679 | """ |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
680 | return bool(self.getDocumentationUrl()) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
681 | |
7161
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
682 | def getDocumentationUrl(self): |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
683 | """ |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
684 | Public method to get the device documentation URL. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
685 | |
7161
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
686 | @return documentation URL of the device |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
687 | @rtype str |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
688 | """ |
728018c32b09
MicroPythonWidget: added actions to show the device documentation and to open the configuration page to the hamburger menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7145
diff
changeset
|
689 | return "" |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
690 | |
7328 | 691 | def hasFirmwareUrl(self): |
692 | """ | |
693 | Public method to check, if the device has a configured firmware | |
694 | download URL. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
695 | |
7328 | 696 | @return flag indicating a configured firmware download URL |
697 | @rtype bool | |
698 | """ | |
699 | return bool(self.getFirmwareUrl()) | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
700 | |
7328 | 701 | def getFirmwareUrl(self): |
702 | """ | |
703 | Public method to get the device firmware download URL. | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
704 | |
7328 | 705 | @return firmware download URL of the device |
706 | @rtype str | |
707 | """ | |
708 | return "" | |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
709 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
710 | def downloadFirmware(self): |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
711 | """ |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
712 | Public method to download the device firmware. |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
713 | """ |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
714 | url = self.getFirmwareUrl() |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8024
diff
changeset
|
715 | if url: |
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:
8318
diff
changeset
|
716 | ericApp().getObject("UserInterface").launchHelpViewer(url) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
717 | |
8051
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
718 | def getDownloadMenuEntries(self): |
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
719 | """ |
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
720 | Public method to retrieve the entries for the downloads menu. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
721 | |
8051
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
722 | @return list of tuples with menu text and URL to be opened for each |
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
723 | entry |
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
724 | @rtype list of tuple of (str, str) |
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
725 | """ |
b78279548993
MicroPython: changed the handling of the download stuff and corrected/extended the Calliope mini path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8038
diff
changeset
|
726 | return [] |