Skip to content

Commit b397096

Browse files
committed
add quecpython.backend
1 parent 2b7e4d5 commit b397096

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+23304
-1
lines changed

thonnycontrib/quecpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from thonny import get_workbench
2-
from thonny.plugins.micropython.mp_front import (
2+
from thonny.plugins.quecpython.backend.mp_front import (
33
add_micropython_backend,
44
GenericBareMetalMicroPythonConfigPage,
55
GenericBareMetalMicroPythonProxy,
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import platform
2+
3+
from thonny import get_workbench
4+
from thonny.languages import tr
5+
from thonny.plugins.quecpython.backend.mp_front import (
6+
BareMetalMicroPythonConfigPage,
7+
BareMetalMicroPythonProxy,
8+
GenericBareMetalMicroPythonConfigPage,
9+
GenericBareMetalMicroPythonProxy,
10+
LocalMicroPythonConfigPage,
11+
LocalMicroPythonProxy,
12+
MicroPythonProxy,
13+
SshMicroPythonConfigPage,
14+
SshMicroPythonProxy,
15+
add_micropython_backend,
16+
list_serial_ports,
17+
)
18+
19+
20+
def load_plugin():
21+
add_micropython_backend(
22+
"GenericMicroPython",
23+
GenericBareMetalMicroPythonProxy,
24+
tr("MicroPython (generic)"),
25+
GenericBareMetalMicroPythonConfigPage,
26+
sort_key="49",
27+
)
28+
29+
get_workbench().set_default("serial.last_backend_per_vid_pid", {})
30+
31+
if platform.system() in ("Linux", "Darwin"):
32+
add_micropython_backend(
33+
"LocalMicroPython",
34+
LocalMicroPythonProxy,
35+
tr("MicroPython (local)"),
36+
LocalMicroPythonConfigPage,
37+
bare_metal=False,
38+
local_rtc=False,
39+
sort_key="21",
40+
)
41+
get_workbench().set_default("LocalMicroPython.executable", "micropython")
42+
43+
add_micropython_backend(
44+
"SshMicroPython",
45+
SshMicroPythonProxy,
46+
tr("MicroPython (SSH)"),
47+
SshMicroPythonConfigPage,
48+
bare_metal=False,
49+
local_rtc=False,
50+
sort_key="22",
51+
)
52+
get_workbench().set_default("SshMicroPython.executable", "micropython")
53+
get_workbench().set_default("SshMicroPython.cwd", None)
54+
get_workbench().set_default("SshMicroPython.host", "")
55+
get_workbench().set_default("SshMicroPython.user", "")
56+
get_workbench().set_default("SshMicroPython.auth_method", "password")
57+
get_workbench().set_default("SshMicroPython.make_uploaded_shebang_scripts_executable", True)
58+
59+
get_workbench().set_default("esptool.show_advanced_options", False)

0 commit comments

Comments
 (0)