16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.MicroPython.MicrobitDevices</h1> |
23 <h1>eric6.MicroPython.MicrobitDevices</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing the device interface class for BBC micro:bit boards. |
26 Module implementing the device interface class for BBC micro:bit boards. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#MicrobitDevice">MicrobitDevice</a></td> |
38 <td><a href="#MicrobitDevice">MicrobitDevice</a></td> |
34 <td>Class implementing the device for BBC micro:bit boards.</td> |
39 <td>Class implementing the device for BBC micro:bit boards.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
|
43 |
38 <table> |
44 <table> |
39 <tr><td>None</td></tr> |
45 <tr><td>None</td></tr> |
40 </table> |
46 </table> |
41 <hr /><hr /> |
47 <hr /> |
|
48 <hr /> |
42 <a NAME="MicrobitDevice" ID="MicrobitDevice"></a> |
49 <a NAME="MicrobitDevice" ID="MicrobitDevice"></a> |
43 <h2>MicrobitDevice</h2> |
50 <h2>MicrobitDevice</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing the device for BBC micro:bit boards. |
53 Class implementing the device for BBC micro:bit boards. |
46 </p> |
54 </p> |
47 <h3>Derived from</h3> |
55 <h3>Derived from</h3> |
48 MicroPythonDevice |
56 MicroPythonDevice |
49 <h3>Class Attributes</h3> |
57 <h3>Class Attributes</h3> |
|
58 |
50 <table> |
59 <table> |
51 <tr><td>None</td></tr> |
60 <tr><td>None</td></tr> |
52 </table> |
61 </table> |
53 <h3>Class Methods</h3> |
62 <h3>Class Methods</h3> |
|
63 |
54 <table> |
64 <table> |
55 <tr><td>None</td></tr> |
65 <tr><td>None</td></tr> |
56 </table> |
66 </table> |
57 <h3>Methods</h3> |
67 <h3>Methods</h3> |
58 <table> |
68 |
|
69 <table> |
|
70 |
59 <tr> |
71 <tr> |
60 <td><a href="#MicrobitDevice.__init__">MicrobitDevice</a></td> |
72 <td><a href="#MicrobitDevice.__init__">MicrobitDevice</a></td> |
61 <td>Constructor</td> |
73 <td>Constructor</td> |
62 </tr><tr> |
74 </tr> |
|
75 <tr> |
63 <td><a href="#MicrobitDevice.__flashCustomMicroPython">__flashCustomMicroPython</a></td> |
76 <td><a href="#MicrobitDevice.__flashCustomMicroPython">__flashCustomMicroPython</a></td> |
64 <td>Private slot to flash a custom MicroPython firmware to the device.</td> |
77 <td>Private slot to flash a custom MicroPython firmware to the device.</td> |
65 </tr><tr> |
78 </tr> |
|
79 <tr> |
66 <td><a href="#MicrobitDevice.__flashMicroPython">__flashMicroPython</a></td> |
80 <td><a href="#MicrobitDevice.__flashMicroPython">__flashMicroPython</a></td> |
67 <td>Private slot to flash the default MicroPython firmware to the device.</td> |
81 <td>Private slot to flash the default MicroPython firmware to the device.</td> |
68 </tr><tr> |
82 </tr> |
|
83 <tr> |
69 <td><a href="#MicrobitDevice.__flashScript">__flashScript</a></td> |
84 <td><a href="#MicrobitDevice.__flashScript">__flashScript</a></td> |
70 <td>Private slot to flash the current script onto the selected device.</td> |
85 <td>Private slot to flash the current script onto the selected device.</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#MicrobitDevice.__installUflashTool">__installUflashTool</a></td> |
88 <td><a href="#MicrobitDevice.__installUflashTool">__installUflashTool</a></td> |
73 <td>Private slot to install the uflash package via pip.</td> |
89 <td>Private slot to install the uflash package via pip.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#MicrobitDevice.__resetDevice">__resetDevice</a></td> |
92 <td><a href="#MicrobitDevice.__resetDevice">__resetDevice</a></td> |
76 <td>Private slot to reset the connected device.</td> |
93 <td>Private slot to reset the connected device.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#MicrobitDevice.__saveMain">__saveMain</a></td> |
96 <td><a href="#MicrobitDevice.__saveMain">__saveMain</a></td> |
79 <td>Private slot to copy the current script as 'main.py' onto the connected device.</td> |
97 <td>Private slot to copy the current script as 'main.py' onto the connected device.</td> |
80 </tr><tr> |
98 </tr> |
|
99 <tr> |
81 <td><a href="#MicrobitDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td> |
100 <td><a href="#MicrobitDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td> |
82 <td>Public method to add device specific entries to the given menu.</td> |
101 <td>Public method to add device specific entries to the given menu.</td> |
83 </tr><tr> |
102 </tr> |
|
103 <tr> |
84 <td><a href="#MicrobitDevice.canRunScript">canRunScript</a></td> |
104 <td><a href="#MicrobitDevice.canRunScript">canRunScript</a></td> |
85 <td>Public method to determine, if a script can be executed.</td> |
105 <td>Public method to determine, if a script can be executed.</td> |
86 </tr><tr> |
106 </tr> |
|
107 <tr> |
87 <td><a href="#MicrobitDevice.canStartFileManager">canStartFileManager</a></td> |
108 <td><a href="#MicrobitDevice.canStartFileManager">canStartFileManager</a></td> |
88 <td>Public method to determine, if a File Manager can be started.</td> |
109 <td>Public method to determine, if a File Manager can be started.</td> |
89 </tr><tr> |
110 </tr> |
|
111 <tr> |
90 <td><a href="#MicrobitDevice.canStartPlotter">canStartPlotter</a></td> |
112 <td><a href="#MicrobitDevice.canStartPlotter">canStartPlotter</a></td> |
91 <td>Public method to determine, if a Plotter can be started.</td> |
113 <td>Public method to determine, if a Plotter can be started.</td> |
92 </tr><tr> |
114 </tr> |
|
115 <tr> |
93 <td><a href="#MicrobitDevice.canStartRepl">canStartRepl</a></td> |
116 <td><a href="#MicrobitDevice.canStartRepl">canStartRepl</a></td> |
94 <td>Public method to determine, if a REPL can be started.</td> |
117 <td>Public method to determine, if a REPL can be started.</td> |
95 </tr><tr> |
118 </tr> |
|
119 <tr> |
96 <td><a href="#MicrobitDevice.deviceName">deviceName</a></td> |
120 <td><a href="#MicrobitDevice.deviceName">deviceName</a></td> |
97 <td>Public method to get the name of the device.</td> |
121 <td>Public method to get the name of the device.</td> |
98 </tr><tr> |
122 </tr> |
|
123 <tr> |
99 <td><a href="#MicrobitDevice.forceInterrupt">forceInterrupt</a></td> |
124 <td><a href="#MicrobitDevice.forceInterrupt">forceInterrupt</a></td> |
100 <td>Public method to determine the need for an interrupt when opening the serial connection.</td> |
125 <td>Public method to determine the need for an interrupt when opening the serial connection.</td> |
101 </tr><tr> |
126 </tr> |
|
127 <tr> |
102 <td><a href="#MicrobitDevice.getDocumentationUrl">getDocumentationUrl</a></td> |
128 <td><a href="#MicrobitDevice.getDocumentationUrl">getDocumentationUrl</a></td> |
103 <td>Public method to get the device documentation URL.</td> |
129 <td>Public method to get the device documentation URL.</td> |
104 </tr><tr> |
130 </tr> |
|
131 <tr> |
105 <td><a href="#MicrobitDevice.getWorkspace">getWorkspace</a></td> |
132 <td><a href="#MicrobitDevice.getWorkspace">getWorkspace</a></td> |
106 <td>Public method to get the workspace directory.</td> |
133 <td>Public method to get the workspace directory.</td> |
107 </tr><tr> |
134 </tr> |
|
135 <tr> |
108 <td><a href="#MicrobitDevice.hasTimeCommands">hasTimeCommands</a></td> |
136 <td><a href="#MicrobitDevice.hasTimeCommands">hasTimeCommands</a></td> |
109 <td>Public method to check, if the device supports time commands.</td> |
137 <td>Public method to check, if the device supports time commands.</td> |
110 </tr><tr> |
138 </tr> |
|
139 <tr> |
111 <td><a href="#MicrobitDevice.runScript">runScript</a></td> |
140 <td><a href="#MicrobitDevice.runScript">runScript</a></td> |
112 <td>Public method to run the given Python script.</td> |
141 <td>Public method to run the given Python script.</td> |
113 </tr><tr> |
142 </tr> |
|
143 <tr> |
114 <td><a href="#MicrobitDevice.setButtons">setButtons</a></td> |
144 <td><a href="#MicrobitDevice.setButtons">setButtons</a></td> |
115 <td>Public method to enable the supported action buttons.</td> |
145 <td>Public method to enable the supported action buttons.</td> |
116 </tr> |
146 </tr> |
117 </table> |
147 </table> |
118 <h3>Static Methods</h3> |
148 <h3>Static Methods</h3> |
|
149 |
119 <table> |
150 <table> |
120 <tr><td>None</td></tr> |
151 <tr><td>None</td></tr> |
121 </table> |
152 </table> |
|
153 |
122 <a NAME="MicrobitDevice.__init__" ID="MicrobitDevice.__init__"></a> |
154 <a NAME="MicrobitDevice.__init__" ID="MicrobitDevice.__init__"></a> |
123 <h4>MicrobitDevice (Constructor)</h4> |
155 <h4>MicrobitDevice (Constructor)</h4> |
124 <b>MicrobitDevice</b>(<i>microPythonWidget, parent=None</i>) |
156 <b>MicrobitDevice</b>(<i>microPythonWidget, parent=None</i>) |
|
157 |
125 <p> |
158 <p> |
126 Constructor |
159 Constructor |
127 </p><dl> |
160 </p> |
|
161 <dl> |
|
162 |
128 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
163 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
129 <dd> |
164 <dd> |
130 reference to the main MicroPython widget |
165 reference to the main MicroPython widget |
131 </dd><dt><i>parent</i> (QObject)</dt> |
166 </dd> |
|
167 <dt><i>parent</i> (QObject)</dt> |
132 <dd> |
168 <dd> |
133 reference to the parent object |
169 reference to the parent object |
134 </dd> |
170 </dd> |
135 </dl><a NAME="MicrobitDevice.__flashCustomMicroPython" ID="MicrobitDevice.__flashCustomMicroPython"></a> |
171 </dl> |
|
172 <a NAME="MicrobitDevice.__flashCustomMicroPython" ID="MicrobitDevice.__flashCustomMicroPython"></a> |
136 <h4>MicrobitDevice.__flashCustomMicroPython</h4> |
173 <h4>MicrobitDevice.__flashCustomMicroPython</h4> |
137 <b>__flashCustomMicroPython</b>(<i></i>) |
174 <b>__flashCustomMicroPython</b>(<i></i>) |
|
175 |
138 <p> |
176 <p> |
139 Private slot to flash a custom MicroPython firmware to the device. |
177 Private slot to flash a custom MicroPython firmware to the device. |
140 </p><a NAME="MicrobitDevice.__flashMicroPython" ID="MicrobitDevice.__flashMicroPython"></a> |
178 </p> |
|
179 <a NAME="MicrobitDevice.__flashMicroPython" ID="MicrobitDevice.__flashMicroPython"></a> |
141 <h4>MicrobitDevice.__flashMicroPython</h4> |
180 <h4>MicrobitDevice.__flashMicroPython</h4> |
142 <b>__flashMicroPython</b>(<i></i>) |
181 <b>__flashMicroPython</b>(<i></i>) |
|
182 |
143 <p> |
183 <p> |
144 Private slot to flash the default MicroPython firmware to the device. |
184 Private slot to flash the default MicroPython firmware to the device. |
145 </p><a NAME="MicrobitDevice.__flashScript" ID="MicrobitDevice.__flashScript"></a> |
185 </p> |
|
186 <a NAME="MicrobitDevice.__flashScript" ID="MicrobitDevice.__flashScript"></a> |
146 <h4>MicrobitDevice.__flashScript</h4> |
187 <h4>MicrobitDevice.__flashScript</h4> |
147 <b>__flashScript</b>(<i></i>) |
188 <b>__flashScript</b>(<i></i>) |
|
189 |
148 <p> |
190 <p> |
149 Private slot to flash the current script onto the selected device. |
191 Private slot to flash the current script onto the selected device. |
150 </p><a NAME="MicrobitDevice.__installUflashTool" ID="MicrobitDevice.__installUflashTool"></a> |
192 </p> |
|
193 <a NAME="MicrobitDevice.__installUflashTool" ID="MicrobitDevice.__installUflashTool"></a> |
151 <h4>MicrobitDevice.__installUflashTool</h4> |
194 <h4>MicrobitDevice.__installUflashTool</h4> |
152 <b>__installUflashTool</b>(<i></i>) |
195 <b>__installUflashTool</b>(<i></i>) |
|
196 |
153 <p> |
197 <p> |
154 Private slot to install the uflash package via pip. |
198 Private slot to install the uflash package via pip. |
155 </p><a NAME="MicrobitDevice.__resetDevice" ID="MicrobitDevice.__resetDevice"></a> |
199 </p> |
|
200 <a NAME="MicrobitDevice.__resetDevice" ID="MicrobitDevice.__resetDevice"></a> |
156 <h4>MicrobitDevice.__resetDevice</h4> |
201 <h4>MicrobitDevice.__resetDevice</h4> |
157 <b>__resetDevice</b>(<i></i>) |
202 <b>__resetDevice</b>(<i></i>) |
|
203 |
158 <p> |
204 <p> |
159 Private slot to reset the connected device. |
205 Private slot to reset the connected device. |
160 </p><a NAME="MicrobitDevice.__saveMain" ID="MicrobitDevice.__saveMain"></a> |
206 </p> |
|
207 <a NAME="MicrobitDevice.__saveMain" ID="MicrobitDevice.__saveMain"></a> |
161 <h4>MicrobitDevice.__saveMain</h4> |
208 <h4>MicrobitDevice.__saveMain</h4> |
162 <b>__saveMain</b>(<i></i>) |
209 <b>__saveMain</b>(<i></i>) |
|
210 |
163 <p> |
211 <p> |
164 Private slot to copy the current script as 'main.py' onto the |
212 Private slot to copy the current script as 'main.py' onto the |
165 connected device. |
213 connected device. |
166 </p><a NAME="MicrobitDevice.addDeviceMenuEntries" ID="MicrobitDevice.addDeviceMenuEntries"></a> |
214 </p> |
|
215 <a NAME="MicrobitDevice.addDeviceMenuEntries" ID="MicrobitDevice.addDeviceMenuEntries"></a> |
167 <h4>MicrobitDevice.addDeviceMenuEntries</h4> |
216 <h4>MicrobitDevice.addDeviceMenuEntries</h4> |
168 <b>addDeviceMenuEntries</b>(<i>menu</i>) |
217 <b>addDeviceMenuEntries</b>(<i>menu</i>) |
|
218 |
169 <p> |
219 <p> |
170 Public method to add device specific entries to the given menu. |
220 Public method to add device specific entries to the given menu. |
171 </p><dl> |
221 </p> |
|
222 <dl> |
|
223 |
172 <dt><i>menu</i> (QMenu)</dt> |
224 <dt><i>menu</i> (QMenu)</dt> |
173 <dd> |
225 <dd> |
174 reference to the context menu |
226 reference to the context menu |
175 </dd> |
227 </dd> |
176 </dl><a NAME="MicrobitDevice.canRunScript" ID="MicrobitDevice.canRunScript"></a> |
228 </dl> |
|
229 <a NAME="MicrobitDevice.canRunScript" ID="MicrobitDevice.canRunScript"></a> |
177 <h4>MicrobitDevice.canRunScript</h4> |
230 <h4>MicrobitDevice.canRunScript</h4> |
178 <b>canRunScript</b>(<i></i>) |
231 <b>canRunScript</b>(<i></i>) |
|
232 |
179 <p> |
233 <p> |
180 Public method to determine, if a script can be executed. |
234 Public method to determine, if a script can be executed. |
181 </p><dl> |
235 </p> |
|
236 <dl> |
182 <dt>Returns:</dt> |
237 <dt>Returns:</dt> |
183 <dd> |
238 <dd> |
184 tuple containing a flag indicating it is safe to start a |
239 tuple containing a flag indicating it is safe to start a |
185 Plotter and a reason why it cannot. |
240 Plotter and a reason why it cannot. |
186 </dd> |
241 </dd> |
187 </dl><dl> |
242 </dl> |
|
243 <dl> |
188 <dt>Return Type:</dt> |
244 <dt>Return Type:</dt> |
189 <dd> |
245 <dd> |
190 tuple of (bool, str) |
246 tuple of (bool, str) |
191 </dd> |
247 </dd> |
192 </dl><a NAME="MicrobitDevice.canStartFileManager" ID="MicrobitDevice.canStartFileManager"></a> |
248 </dl> |
|
249 <a NAME="MicrobitDevice.canStartFileManager" ID="MicrobitDevice.canStartFileManager"></a> |
193 <h4>MicrobitDevice.canStartFileManager</h4> |
250 <h4>MicrobitDevice.canStartFileManager</h4> |
194 <b>canStartFileManager</b>(<i></i>) |
251 <b>canStartFileManager</b>(<i></i>) |
|
252 |
195 <p> |
253 <p> |
196 Public method to determine, if a File Manager can be started. |
254 Public method to determine, if a File Manager can be started. |
197 </p><dl> |
255 </p> |
|
256 <dl> |
198 <dt>Returns:</dt> |
257 <dt>Returns:</dt> |
199 <dd> |
258 <dd> |
200 tuple containing a flag indicating it is safe to start a |
259 tuple containing a flag indicating it is safe to start a |
201 File Manager and a reason why it cannot. |
260 File Manager and a reason why it cannot. |
202 </dd> |
261 </dd> |
203 </dl><dl> |
262 </dl> |
|
263 <dl> |
204 <dt>Return Type:</dt> |
264 <dt>Return Type:</dt> |
205 <dd> |
265 <dd> |
206 tuple of (bool, str) |
266 tuple of (bool, str) |
207 </dd> |
267 </dd> |
208 </dl><a NAME="MicrobitDevice.canStartPlotter" ID="MicrobitDevice.canStartPlotter"></a> |
268 </dl> |
|
269 <a NAME="MicrobitDevice.canStartPlotter" ID="MicrobitDevice.canStartPlotter"></a> |
209 <h4>MicrobitDevice.canStartPlotter</h4> |
270 <h4>MicrobitDevice.canStartPlotter</h4> |
210 <b>canStartPlotter</b>(<i></i>) |
271 <b>canStartPlotter</b>(<i></i>) |
|
272 |
211 <p> |
273 <p> |
212 Public method to determine, if a Plotter can be started. |
274 Public method to determine, if a Plotter can be started. |
213 </p><dl> |
275 </p> |
|
276 <dl> |
214 <dt>Returns:</dt> |
277 <dt>Returns:</dt> |
215 <dd> |
278 <dd> |
216 tuple containing a flag indicating it is safe to start a |
279 tuple containing a flag indicating it is safe to start a |
217 Plotter and a reason why it cannot. |
280 Plotter and a reason why it cannot. |
218 </dd> |
281 </dd> |
219 </dl><dl> |
282 </dl> |
|
283 <dl> |
220 <dt>Return Type:</dt> |
284 <dt>Return Type:</dt> |
221 <dd> |
285 <dd> |
222 tuple of (bool, str) |
286 tuple of (bool, str) |
223 </dd> |
287 </dd> |
224 </dl><a NAME="MicrobitDevice.canStartRepl" ID="MicrobitDevice.canStartRepl"></a> |
288 </dl> |
|
289 <a NAME="MicrobitDevice.canStartRepl" ID="MicrobitDevice.canStartRepl"></a> |
225 <h4>MicrobitDevice.canStartRepl</h4> |
290 <h4>MicrobitDevice.canStartRepl</h4> |
226 <b>canStartRepl</b>(<i></i>) |
291 <b>canStartRepl</b>(<i></i>) |
|
292 |
227 <p> |
293 <p> |
228 Public method to determine, if a REPL can be started. |
294 Public method to determine, if a REPL can be started. |
229 </p><dl> |
295 </p> |
|
296 <dl> |
230 <dt>Returns:</dt> |
297 <dt>Returns:</dt> |
231 <dd> |
298 <dd> |
232 tuple containing a flag indicating it is safe to start a REPL |
299 tuple containing a flag indicating it is safe to start a REPL |
233 and a reason why it cannot. |
300 and a reason why it cannot. |
234 </dd> |
301 </dd> |
235 </dl><dl> |
302 </dl> |
|
303 <dl> |
236 <dt>Return Type:</dt> |
304 <dt>Return Type:</dt> |
237 <dd> |
305 <dd> |
238 tuple of (bool, str) |
306 tuple of (bool, str) |
239 </dd> |
307 </dd> |
240 </dl><a NAME="MicrobitDevice.deviceName" ID="MicrobitDevice.deviceName"></a> |
308 </dl> |
|
309 <a NAME="MicrobitDevice.deviceName" ID="MicrobitDevice.deviceName"></a> |
241 <h4>MicrobitDevice.deviceName</h4> |
310 <h4>MicrobitDevice.deviceName</h4> |
242 <b>deviceName</b>(<i></i>) |
311 <b>deviceName</b>(<i></i>) |
|
312 |
243 <p> |
313 <p> |
244 Public method to get the name of the device. |
314 Public method to get the name of the device. |
245 </p><dl> |
315 </p> |
|
316 <dl> |
246 <dt>Returns:</dt> |
317 <dt>Returns:</dt> |
247 <dd> |
318 <dd> |
248 name of the device |
319 name of the device |
249 </dd> |
320 </dd> |
250 </dl><dl> |
321 </dl> |
|
322 <dl> |
251 <dt>Return Type:</dt> |
323 <dt>Return Type:</dt> |
252 <dd> |
324 <dd> |
253 str |
325 str |
254 </dd> |
326 </dd> |
255 </dl><a NAME="MicrobitDevice.forceInterrupt" ID="MicrobitDevice.forceInterrupt"></a> |
327 </dl> |
|
328 <a NAME="MicrobitDevice.forceInterrupt" ID="MicrobitDevice.forceInterrupt"></a> |
256 <h4>MicrobitDevice.forceInterrupt</h4> |
329 <h4>MicrobitDevice.forceInterrupt</h4> |
257 <b>forceInterrupt</b>(<i></i>) |
330 <b>forceInterrupt</b>(<i></i>) |
|
331 |
258 <p> |
332 <p> |
259 Public method to determine the need for an interrupt when opening the |
333 Public method to determine the need for an interrupt when opening the |
260 serial connection. |
334 serial connection. |
261 </p><dl> |
335 </p> |
|
336 <dl> |
262 <dt>Returns:</dt> |
337 <dt>Returns:</dt> |
263 <dd> |
338 <dd> |
264 flag indicating an interrupt is needed |
339 flag indicating an interrupt is needed |
265 </dd> |
340 </dd> |
266 </dl><dl> |
341 </dl> |
|
342 <dl> |
267 <dt>Return Type:</dt> |
343 <dt>Return Type:</dt> |
268 <dd> |
344 <dd> |
269 bool |
345 bool |
270 </dd> |
346 </dd> |
271 </dl><a NAME="MicrobitDevice.getDocumentationUrl" ID="MicrobitDevice.getDocumentationUrl"></a> |
347 </dl> |
|
348 <a NAME="MicrobitDevice.getDocumentationUrl" ID="MicrobitDevice.getDocumentationUrl"></a> |
272 <h4>MicrobitDevice.getDocumentationUrl</h4> |
349 <h4>MicrobitDevice.getDocumentationUrl</h4> |
273 <b>getDocumentationUrl</b>(<i></i>) |
350 <b>getDocumentationUrl</b>(<i></i>) |
|
351 |
274 <p> |
352 <p> |
275 Public method to get the device documentation URL. |
353 Public method to get the device documentation URL. |
276 </p><dl> |
354 </p> |
|
355 <dl> |
277 <dt>Returns:</dt> |
356 <dt>Returns:</dt> |
278 <dd> |
357 <dd> |
279 documentation URL of the device |
358 documentation URL of the device |
280 </dd> |
359 </dd> |
281 </dl><dl> |
360 </dl> |
|
361 <dl> |
282 <dt>Return Type:</dt> |
362 <dt>Return Type:</dt> |
283 <dd> |
363 <dd> |
284 str |
364 str |
285 </dd> |
365 </dd> |
286 </dl><a NAME="MicrobitDevice.getWorkspace" ID="MicrobitDevice.getWorkspace"></a> |
366 </dl> |
|
367 <a NAME="MicrobitDevice.getWorkspace" ID="MicrobitDevice.getWorkspace"></a> |
287 <h4>MicrobitDevice.getWorkspace</h4> |
368 <h4>MicrobitDevice.getWorkspace</h4> |
288 <b>getWorkspace</b>(<i></i>) |
369 <b>getWorkspace</b>(<i></i>) |
|
370 |
289 <p> |
371 <p> |
290 Public method to get the workspace directory. |
372 Public method to get the workspace directory. |
291 </p><dl> |
373 </p> |
|
374 <dl> |
292 <dt>Returns:</dt> |
375 <dt>Returns:</dt> |
293 <dd> |
376 <dd> |
294 workspace directory used for saving files |
377 workspace directory used for saving files |
295 </dd> |
378 </dd> |
296 </dl><dl> |
379 </dl> |
|
380 <dl> |
297 <dt>Return Type:</dt> |
381 <dt>Return Type:</dt> |
298 <dd> |
382 <dd> |
299 str |
383 str |
300 </dd> |
384 </dd> |
301 </dl><a NAME="MicrobitDevice.hasTimeCommands" ID="MicrobitDevice.hasTimeCommands"></a> |
385 </dl> |
|
386 <a NAME="MicrobitDevice.hasTimeCommands" ID="MicrobitDevice.hasTimeCommands"></a> |
302 <h4>MicrobitDevice.hasTimeCommands</h4> |
387 <h4>MicrobitDevice.hasTimeCommands</h4> |
303 <b>hasTimeCommands</b>(<i></i>) |
388 <b>hasTimeCommands</b>(<i></i>) |
|
389 |
304 <p> |
390 <p> |
305 Public method to check, if the device supports time commands. |
391 Public method to check, if the device supports time commands. |
306 </p><p> |
392 </p> |
|
393 <p> |
307 The default returns True. |
394 The default returns True. |
308 </p><dl> |
395 </p> |
|
396 <dl> |
309 <dt>Returns:</dt> |
397 <dt>Returns:</dt> |
310 <dd> |
398 <dd> |
311 flag indicating support for time commands |
399 flag indicating support for time commands |
312 </dd> |
400 </dd> |
313 </dl><dl> |
401 </dl> |
|
402 <dl> |
314 <dt>Return Type:</dt> |
403 <dt>Return Type:</dt> |
315 <dd> |
404 <dd> |
316 bool |
405 bool |
317 </dd> |
406 </dd> |
318 </dl><a NAME="MicrobitDevice.runScript" ID="MicrobitDevice.runScript"></a> |
407 </dl> |
|
408 <a NAME="MicrobitDevice.runScript" ID="MicrobitDevice.runScript"></a> |
319 <h4>MicrobitDevice.runScript</h4> |
409 <h4>MicrobitDevice.runScript</h4> |
320 <b>runScript</b>(<i>script</i>) |
410 <b>runScript</b>(<i>script</i>) |
|
411 |
321 <p> |
412 <p> |
322 Public method to run the given Python script. |
413 Public method to run the given Python script. |
323 </p><dl> |
414 </p> |
|
415 <dl> |
|
416 |
324 <dt><i>script</i> (str)</dt> |
417 <dt><i>script</i> (str)</dt> |
325 <dd> |
418 <dd> |
326 script to be executed |
419 script to be executed |
327 </dd> |
420 </dd> |
328 </dl><a NAME="MicrobitDevice.setButtons" ID="MicrobitDevice.setButtons"></a> |
421 </dl> |
|
422 <a NAME="MicrobitDevice.setButtons" ID="MicrobitDevice.setButtons"></a> |
329 <h4>MicrobitDevice.setButtons</h4> |
423 <h4>MicrobitDevice.setButtons</h4> |
330 <b>setButtons</b>(<i></i>) |
424 <b>setButtons</b>(<i></i>) |
|
425 |
331 <p> |
426 <p> |
332 Public method to enable the supported action buttons. |
427 Public method to enable the supported action buttons. |
333 </p> |
428 </p> |
334 <div align="right"><a href="#top">Up</a></div> |
429 <div align="right"><a href="#top">Up</a></div> |
335 <hr /> |
430 <hr /> |