Tue, 18 Oct 2022 16:06:21 +0200
Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
8881
54e42bc2437a
Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8825
diff
changeset
|
3 | # Copyright (c) 2019 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing the MicroPython configuration page. |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
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:
9221
diff
changeset
|
10 | from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
7140
22f5fd76c10f
MicroPythonWidget: added menu entries to cross compile a selectable Python file or the current editor to a .mpy file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7135
diff
changeset
|
11 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | from .ConfigurationPageBase import ConfigurationPageBase |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | from .Ui_MicroPythonPage import Ui_MicroPythonPage |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | |
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:
9221
diff
changeset
|
15 | from eric7 import Preferences, Utilities |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | |
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:
9221
diff
changeset
|
17 | from eric7.MicroPython.MicroPythonWidget import AnsiColorSchemes |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | class MicroPythonPage(ConfigurationPageBase, Ui_MicroPythonPage): |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | """ |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | Class implementing the MicroPython configuration page. |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
24 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | def __init__(self, parent=None): |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | """ |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | Constructor |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
28 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | @param parent reference to the parent widget |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | @type QWidget |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | """ |
8218
7c09585bd960
Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
32 | super().__init__() |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | self.setupUi(self) |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | self.setObjectName("MicroPythonPage") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
35 | |
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:
8343
diff
changeset
|
36 | self.workspacePicker.setMode(EricPathPickerModes.DIRECTORY_MODE) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
37 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
38 | self.colorSchemeComboBox.addItems(sorted(AnsiColorSchemes.keys())) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
39 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
40 | # populate the chart theme combobox |
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
41 | try: |
8343
242d5dae2937
Corrected some place to import QtCharts instead of QtChart.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8327
diff
changeset
|
42 | from PyQt6.QtCharts import QChart |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
43 | |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
44 | self.chartThemeComboBox.addItem(self.tr("Automatic"), -1) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
45 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
46 | self.tr("Light"), QChart.ChartTheme.ChartThemeLight |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
47 | ) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
48 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
49 | self.tr("Dark"), QChart.ChartTheme.ChartThemeDark |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
50 | ) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
51 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
52 | self.tr("Blue Cerulean"), QChart.ChartTheme.ChartThemeBlueCerulean |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
53 | ) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
54 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
55 | self.tr("Brown Sand"), QChart.ChartTheme.ChartThemeBrownSand |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
56 | ) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
57 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
58 | self.tr("Blue NCS"), QChart.ChartTheme.ChartThemeBlueNcs |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
59 | ) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
60 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
61 | self.tr("High Contrast"), QChart.ChartTheme.ChartThemeHighContrast |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
62 | ) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
63 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
64 | self.tr("Blue Icy"), QChart.ChartTheme.ChartThemeBlueIcy |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
65 | ) |
7541
b265a2d0a797
MicroPythonPage: fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7535
diff
changeset
|
66 | self.chartThemeComboBox.addItem( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
67 | self.tr("Qt"), QChart.ChartTheme.ChartThemeQt |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
68 | ) |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
69 | except ImportError: |
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
70 | self.chartThemeComboBox.setEnabled(False) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
71 | |
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:
8343
diff
changeset
|
72 | self.mpyCrossPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
7140
22f5fd76c10f
MicroPythonWidget: added menu entries to cross compile a selectable Python file or the current editor to a .mpy file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7135
diff
changeset
|
73 | self.mpyCrossPicker.setFilters(self.tr("All Files (*)")) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
74 | |
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:
8343
diff
changeset
|
75 | self.dfuUtilPathPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
7327 | 76 | self.dfuUtilPathPicker.setFilters(self.tr("All Files (*)")) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
77 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
78 | # set initial values |
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:
8053
diff
changeset
|
79 | # workspace |
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:
8053
diff
changeset
|
80 | self.workspacePicker.setText( |
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:
8053
diff
changeset
|
81 | Utilities.toNativeSeparators( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
82 | Preferences.getMicroPython("MpyWorkspace") or Utilities.getHomeDir() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
83 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
84 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
85 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
86 | # serial link parameters |
7099
89f11ae6bec3
Preferences: added an option to configure the REPL pane line wrap mode.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7086
diff
changeset
|
87 | self.timeoutSpinBox.setValue( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
88 | Preferences.getMicroPython("SerialTimeout") // 1000 |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
89 | ) |
7099
89f11ae6bec3
Preferences: added an option to configure the REPL pane line wrap mode.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7086
diff
changeset
|
90 | # converted to seconds |
7135
44fcfc99b864
MicroPython: added an option to synchronize the device time to the host time after connecting the serial port.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7134
diff
changeset
|
91 | self.syncTimeCheckBox.setChecked( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
92 | Preferences.getMicroPython("SyncTimeAfterConnect") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
93 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
94 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
95 | # REPL Pane |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
96 | self.colorSchemeComboBox.setCurrentIndex( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
97 | self.colorSchemeComboBox.findText(Preferences.getMicroPython("ColorScheme")) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
98 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
99 | self.replWrapCheckBox.setChecked(Preferences.getMicroPython("ReplLineWrap")) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
100 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
101 | # Chart Pane |
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
102 | index = self.chartThemeComboBox.findData( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
103 | Preferences.getMicroPython("ChartColorTheme") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
104 | ) |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
105 | if index < 0: |
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
106 | index = 0 |
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
107 | self.chartThemeComboBox.setCurrentIndex(index) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
108 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
109 | # MPY Cross Compiler |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
110 | self.mpyCrossPicker.setText(Preferences.getMicroPython("MpyCrossCompiler")) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
111 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
112 | # PyBoard specifics |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
113 | self.dfuUtilPathPicker.setText(Preferences.getMicroPython("DfuUtilPath")) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
114 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
115 | # MicroPython URLs |
7328 | 116 | self.micropythonFirmwareUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
117 | Preferences.getMicroPython("MicroPythonFirmwareUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
118 | ) |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
119 | self.micropythonDocuUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
120 | Preferences.getMicroPython("MicroPythonDocuUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
121 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
122 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
123 | # CircuitPython URLs |
7328 | 124 | self.circuitpythonFirmwareUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
125 | Preferences.getMicroPython("CircuitPythonFirmwareUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
126 | ) |
8053
5316e335722f
CircuitPython: added downloads menu for Firmware and Libraries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8051
diff
changeset
|
127 | self.circuitpythonLibrariesUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
128 | Preferences.getMicroPython("CircuitPythonLibrariesUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
129 | ) |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
130 | self.circuitpythonDocuUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
131 | Preferences.getMicroPython("CircuitPythonDocuUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
132 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
133 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
134 | # BBC micro:bit URLs |
7328 | 135 | self.microbitFirmwareUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
136 | Preferences.getMicroPython("MicrobitFirmwareUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
137 | ) |
8091
c000526a6d0d
MicroPython: added (preliminary) support for micro:bit V2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8067
diff
changeset
|
138 | self.microbitV1MicroPythonUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
139 | Preferences.getMicroPython("MicrobitMicroPythonUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
140 | ) |
8091
c000526a6d0d
MicroPython: added (preliminary) support for micro:bit V2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8067
diff
changeset
|
141 | self.microbitV2MicroPythonUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
142 | Preferences.getMicroPython("MicrobitV2MicroPythonUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
143 | ) |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
144 | self.microbitDocuUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
145 | Preferences.getMicroPython("MicrobitDocuUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
146 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
147 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
148 | # Calliope mini URLs |
7548
e1c6a2e32a38
MicroPython: started implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7541
diff
changeset
|
149 | self.calliopeFirmwareUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
150 | Preferences.getMicroPython("CalliopeDAPLinkUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
151 | ) |
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
|
152 | self.calliopeMicroPythonUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
153 | Preferences.getMicroPython("CalliopeMicroPythonUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
154 | ) |
7548
e1c6a2e32a38
MicroPython: started implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7541
diff
changeset
|
155 | self.calliopeDocuUrlLineEdit.setText( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
156 | Preferences.getMicroPython("CalliopeDocuUrl") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
157 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
158 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
159 | def save(self): |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
160 | """ |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
161 | Public slot to save the MicroPython configuration. |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
162 | """ |
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:
8053
diff
changeset
|
163 | # workspace |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
164 | Preferences.setMicroPython("MpyWorkspace", self.workspacePicker.text()) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
165 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
166 | # serial link parameters |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
167 | Preferences.setMicroPython("SerialTimeout", self.timeoutSpinBox.value() * 1000) |
7099
89f11ae6bec3
Preferences: added an option to configure the REPL pane line wrap mode.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7086
diff
changeset
|
168 | # converted to milliseconds |
89f11ae6bec3
Preferences: added an option to configure the REPL pane line wrap mode.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7086
diff
changeset
|
169 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
170 | "SyncTimeAfterConnect", self.syncTimeCheckBox.isChecked() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
171 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
172 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
173 | # REPL Pane |
7135
44fcfc99b864
MicroPython: added an option to synchronize the device time to the host time after connecting the serial port.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7134
diff
changeset
|
174 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
175 | "ColorScheme", self.colorSchemeComboBox.currentText() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
176 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
177 | Preferences.setMicroPython("ReplLineWrap", self.replWrapCheckBox.isChecked()) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
178 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
179 | # Chart Pane |
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
180 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
181 | "ChartColorTheme", self.chartThemeComboBox.currentData() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
182 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
183 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
184 | # MPY Cross Compiler |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
185 | Preferences.setMicroPython("MpyCrossCompiler", self.mpyCrossPicker.text()) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
186 | |
7535
dac9bc72a0f3
MicroPython: made the chart widget color scheme aware and added a config option to configure a specific chart color theme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
187 | # PyBoard specifics |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
188 | Preferences.setMicroPython("DfuUtilPath", self.dfuUtilPathPicker.text()) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
189 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
190 | # MicroPython URLs |
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:
7140
diff
changeset
|
191 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
192 | "MicroPythonFirmwareUrl", self.micropythonFirmwareUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
193 | ) |
7327 | 194 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
195 | "MicroPythonDocuUrl", self.micropythonDocuUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
196 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
197 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
198 | # CircuitPython URLs |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
199 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
200 | "CircuitPythonFirmwareUrl", self.circuitpythonFirmwareUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
201 | ) |
7328 | 202 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
203 | "CircuitPythonLibrariesUrl", self.circuitpythonLibrariesUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
204 | ) |
8053
5316e335722f
CircuitPython: added downloads menu for Firmware and Libraries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8051
diff
changeset
|
205 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
206 | "CircuitPythonDocuUrl", self.circuitpythonDocuUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
207 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
208 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
209 | # BBC micro:bit URLs |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
210 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
211 | "MicrobitFirmwareUrl", self.microbitFirmwareUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
212 | ) |
7548
e1c6a2e32a38
MicroPython: started implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7541
diff
changeset
|
213 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
214 | "MicrobitMicroPythonUrl", self.microbitV1MicroPythonUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
215 | ) |
8091
c000526a6d0d
MicroPython: added (preliminary) support for micro:bit V2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8067
diff
changeset
|
216 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
217 | "MicrobitV2MicroPythonUrl", self.microbitV2MicroPythonUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
218 | ) |
7328 | 219 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
220 | "MicrobitDocuUrl", self.microbitDocuUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
221 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
222 | |
8038
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
223 | # Calliope mini URLs |
73ec029d4107
MicroPython: improved the support for "BBC micro:bit" and "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8032
diff
changeset
|
224 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
225 | "CalliopeDAPLinkUrl", self.calliopeFirmwareUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
226 | ) |
7548
e1c6a2e32a38
MicroPython: started implementing support for the "Calliope mini".
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7541
diff
changeset
|
227 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
228 | "CalliopeMicroPythonUrl", self.calliopeMicroPythonUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
229 | ) |
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
|
230 | Preferences.setMicroPython( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
231 | "CalliopeDocuUrl", self.calliopeDocuUrlLineEdit.text() |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
232 | ) |
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:
7140
diff
changeset
|
233 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
234 | |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
235 | def create(dlg): |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
236 | """ |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
237 | Module function to create the configuration page. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
238 | |
7079
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
239 | @param dlg reference to the configuration dialog |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
240 | @return reference to the instantiated page (ConfigurationPageBase) |
d1564b590677
Preferences: added a configuration pyge for the MicroPython interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
241 | """ |
7140
22f5fd76c10f
MicroPythonWidget: added menu entries to cross compile a selectable Python file or the current editor to a .mpy file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7135
diff
changeset
|
242 | return MicroPythonPage() |