meerk40t 0.9.7051__py2.py3-none-any.whl → 0.9.7900__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meerk40t/balormk/controller.py +3 -3
- meerk40t/balormk/device.py +7 -0
- meerk40t/balormk/driver.py +23 -14
- meerk40t/balormk/galvo_commands.py +18 -3
- meerk40t/balormk/gui/balorconfig.py +6 -0
- meerk40t/balormk/livelightjob.py +36 -14
- meerk40t/camera/camera.py +1 -0
- meerk40t/camera/gui/camerapanel.py +154 -58
- meerk40t/camera/plugin.py +46 -5
- meerk40t/core/elements/branches.py +90 -20
- meerk40t/core/elements/elements.py +59 -37
- meerk40t/core/elements/trace.py +10 -6
- meerk40t/core/node/node.py +2 -0
- meerk40t/core/plotplanner.py +7 -4
- meerk40t/device/gui/defaultactions.py +78 -14
- meerk40t/dxf/dxf_io.py +42 -0
- meerk40t/grbl/controller.py +245 -35
- meerk40t/grbl/device.py +102 -26
- meerk40t/grbl/driver.py +8 -2
- meerk40t/grbl/gui/grblconfiguration.py +6 -0
- meerk40t/grbl/gui/grblcontroller.py +1 -1
- meerk40t/gui/about.py +7 -0
- meerk40t/gui/choicepropertypanel.py +20 -30
- meerk40t/gui/devicepanel.py +27 -16
- meerk40t/gui/icons.py +15 -0
- meerk40t/gui/laserpanel.py +102 -54
- meerk40t/gui/materialtest.py +10 -0
- meerk40t/gui/mkdebug.py +268 -9
- meerk40t/gui/navigationpanels.py +65 -7
- meerk40t/gui/propertypanels/operationpropertymain.py +185 -91
- meerk40t/gui/scenewidgets/elementswidget.py +7 -1
- meerk40t/gui/scenewidgets/selectionwidget.py +24 -9
- meerk40t/gui/simulation.py +1 -1
- meerk40t/gui/statusbarwidgets/shapepropwidget.py +50 -40
- meerk40t/gui/statusbarwidgets/statusbar.py +2 -2
- meerk40t/gui/toolwidgets/toolmeasure.py +1 -1
- meerk40t/gui/toolwidgets/toolnodeedit.py +4 -1
- meerk40t/gui/toolwidgets/tooltabedit.py +9 -7
- meerk40t/gui/wxmeerk40t.py +2 -0
- meerk40t/gui/wxmmain.py +23 -9
- meerk40t/gui/wxmribbon.py +36 -0
- meerk40t/gui/wxutils.py +66 -42
- meerk40t/kernel/inhibitor.py +120 -0
- meerk40t/kernel/kernel.py +38 -0
- meerk40t/lihuiyu/controller.py +33 -3
- meerk40t/lihuiyu/device.py +99 -4
- meerk40t/lihuiyu/driver.py +62 -5
- meerk40t/lihuiyu/gui/lhycontrollergui.py +69 -24
- meerk40t/lihuiyu/gui/lhydrivergui.py +6 -0
- meerk40t/lihuiyu/laserspeed.py +17 -10
- meerk40t/lihuiyu/parser.py +23 -0
- meerk40t/main.py +1 -1
- meerk40t/moshi/gui/moshidrivergui.py +7 -0
- meerk40t/newly/controller.py +3 -2
- meerk40t/newly/device.py +23 -2
- meerk40t/newly/driver.py +8 -3
- meerk40t/newly/gui/newlyconfig.py +7 -0
- meerk40t/ruida/gui/ruidaconfig.py +7 -0
- meerk40t/tools/geomstr.py +68 -48
- meerk40t/tools/rasterplotter.py +0 -5
- meerk40t/tools/ttfparser.py +155 -82
- {meerk40t-0.9.7051.dist-info → meerk40t-0.9.7900.dist-info}/METADATA +1 -1
- {meerk40t-0.9.7051.dist-info → meerk40t-0.9.7900.dist-info}/RECORD +68 -67
- {meerk40t-0.9.7051.dist-info → meerk40t-0.9.7900.dist-info}/LICENSE +0 -0
- {meerk40t-0.9.7051.dist-info → meerk40t-0.9.7900.dist-info}/WHEEL +0 -0
- {meerk40t-0.9.7051.dist-info → meerk40t-0.9.7900.dist-info}/entry_points.txt +0 -0
- {meerk40t-0.9.7051.dist-info → meerk40t-0.9.7900.dist-info}/top_level.txt +0 -0
- {meerk40t-0.9.7051.dist-info → meerk40t-0.9.7900.dist-info}/zip-safe +0 -0
@@ -5,18 +5,27 @@ from meerk40t.gui.icons import (
|
|
5
5
|
icon_air_on,
|
6
6
|
icon_bell,
|
7
7
|
icon_close_window,
|
8
|
+
icon_coffee,
|
8
9
|
icon_console,
|
9
10
|
icon_external,
|
10
11
|
icon_internal,
|
11
12
|
icon_return,
|
12
13
|
icon_round_stop,
|
14
|
+
icon_sleep,
|
13
15
|
icon_timer,
|
14
16
|
icon_trash,
|
15
17
|
icons8_down,
|
16
18
|
icons8_home_filled,
|
17
19
|
icons8_up,
|
18
20
|
)
|
19
|
-
from meerk40t.gui.wxutils import
|
21
|
+
from meerk40t.gui.wxutils import (
|
22
|
+
StaticBoxSizer,
|
23
|
+
TextCtrl,
|
24
|
+
dip_size,
|
25
|
+
wxButton,
|
26
|
+
wxListCtrl,
|
27
|
+
wxStaticBitmap,
|
28
|
+
)
|
20
29
|
|
21
30
|
_ = wx.GetTranslation
|
22
31
|
|
@@ -37,16 +46,31 @@ class DefaultActionPanel(wx.Panel):
|
|
37
46
|
|
38
47
|
self.SetHelpText("defaultactions")
|
39
48
|
|
40
|
-
self.standards =
|
41
|
-
("Home", "util home", ""),
|
42
|
-
(
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
(
|
49
|
-
|
49
|
+
self.standards = [
|
50
|
+
("Home", "util home", "", _("Move the laser head to the home position.")),
|
51
|
+
(
|
52
|
+
"Goto Origin",
|
53
|
+
"util goto",
|
54
|
+
"0,0",
|
55
|
+
_("Move the laser head to the origin position."),
|
56
|
+
),
|
57
|
+
(
|
58
|
+
"Goto 0,0",
|
59
|
+
"util goto",
|
60
|
+
"0,0,True",
|
61
|
+
_("Move the laser head to the absolute position 0,0."),
|
62
|
+
),
|
63
|
+
("Beep", "util console", "beep", _("Make audible beep.")),
|
64
|
+
(
|
65
|
+
"Interrupt",
|
66
|
+
"util console",
|
67
|
+
'interrupt "Spooling was interrupted"',
|
68
|
+
_("Interrupt the current operation and display a message."),
|
69
|
+
),
|
70
|
+
("Console", "util console", "", _("Execute a command in the console.")),
|
71
|
+
("Coolant on", "util console", "coolant_on", _("Turn on the coolant.")),
|
72
|
+
("Coolant off", "util console", "coolant_off", _("Turn off the coolant.")),
|
73
|
+
]
|
50
74
|
self.default_images = [
|
51
75
|
["console home -f", icons8_home_filled],
|
52
76
|
["console move_abs", icon_return],
|
@@ -62,6 +86,25 @@ class DefaultActionPanel(wx.Panel):
|
|
62
86
|
["console coolant_on", icon_air_on],
|
63
87
|
["console coolant_off", icon_air_off],
|
64
88
|
]
|
89
|
+
if self.context.kernel.inhibitor.available:
|
90
|
+
self.standards += [
|
91
|
+
(
|
92
|
+
"Hibernation off",
|
93
|
+
"util console",
|
94
|
+
"system_hibernate prevent",
|
95
|
+
_("Prevent the system from entering hibernation mode."),
|
96
|
+
),
|
97
|
+
(
|
98
|
+
"Hibernation on",
|
99
|
+
"util console",
|
100
|
+
"system_hibernate allow",
|
101
|
+
_("Allow the system to enter hibernation mode."),
|
102
|
+
),
|
103
|
+
]
|
104
|
+
self.default_images += [
|
105
|
+
["console system_hibernate prevent", icon_coffee],
|
106
|
+
["console system_hibernate allow", icon_sleep],
|
107
|
+
]
|
65
108
|
self.prepend_ops = []
|
66
109
|
self.append_ops = []
|
67
110
|
|
@@ -71,7 +114,9 @@ class DefaultActionPanel(wx.Panel):
|
|
71
114
|
sizer_middle = wx.BoxSizer(wx.VERTICAL)
|
72
115
|
|
73
116
|
iconsize = dip_size(self, 30, 20)
|
74
|
-
bmpsize =
|
117
|
+
bmpsize = (
|
118
|
+
min(iconsize[0], iconsize[1]) * self.context.root.bitmap_correction_scale
|
119
|
+
)
|
75
120
|
self.option_list = wxListCtrl(
|
76
121
|
self,
|
77
122
|
wx.ID_ANY,
|
@@ -84,12 +129,18 @@ class DefaultActionPanel(wx.Panel):
|
|
84
129
|
self.button_add_append = wxButton(self, wx.ID_ANY, _("Add to Job End"))
|
85
130
|
|
86
131
|
self.prepend_list = wxListCtrl(
|
87
|
-
self,
|
132
|
+
self,
|
133
|
+
wx.ID_ANY,
|
134
|
+
style=wx.LC_LIST | wx.LC_SINGLE_SEL,
|
135
|
+
context=self.context,
|
88
136
|
)
|
89
137
|
self.text_param_prepend = TextCtrl(self, wx.ID_ANY)
|
90
138
|
|
91
139
|
self.append_list = wxListCtrl(
|
92
|
-
self,
|
140
|
+
self,
|
141
|
+
wx.ID_ANY,
|
142
|
+
style=wx.LC_LIST | wx.LC_SINGLE_SEL,
|
143
|
+
context=self.context,
|
93
144
|
)
|
94
145
|
self.text_param_append = TextCtrl(self, wx.ID_ANY)
|
95
146
|
self.button_del_prepend = wxStaticBitmap(self, wx.ID_ANY, size=iconsize)
|
@@ -198,6 +249,7 @@ class DefaultActionPanel(wx.Panel):
|
|
198
249
|
|
199
250
|
# Logic for addition of new entries
|
200
251
|
self.option_list.Bind(wx.EVT_LIST_ITEM_SELECTED, self.option_single_click)
|
252
|
+
self.option_list.Bind(wx.EVT_MOTION, self.option_hover)
|
201
253
|
self.button_add_prepend.Bind(wx.EVT_BUTTON, self.add_prepend_option)
|
202
254
|
self.button_add_append.Bind(wx.EVT_BUTTON, self.add_append_option)
|
203
255
|
|
@@ -437,6 +489,7 @@ class DefaultActionPanel(wx.Panel):
|
|
437
489
|
if idx < 0 or idx >= len(self.standards):
|
438
490
|
active = False
|
439
491
|
self.text_param_option.SetValue("")
|
492
|
+
self.option_list.SetToolTip("")
|
440
493
|
else:
|
441
494
|
active = True
|
442
495
|
self.text_param_option.SetValue(self.standards[idx][2])
|
@@ -447,6 +500,17 @@ class DefaultActionPanel(wx.Panel):
|
|
447
500
|
):
|
448
501
|
ctrl.Enable(active)
|
449
502
|
|
503
|
+
def option_hover(self, event):
|
504
|
+
position = event.GetPosition()
|
505
|
+
idx, flags = self.option_list.HitTest(position)
|
506
|
+
if idx < 0 or idx >= len(self.standards):
|
507
|
+
self.option_list.SetToolTip("")
|
508
|
+
else:
|
509
|
+
tooltip = self.standards[idx][3]
|
510
|
+
if tooltip is None:
|
511
|
+
tooltip = ""
|
512
|
+
self.option_list.SetToolTip(tooltip)
|
513
|
+
|
450
514
|
### Data storage / retrieval
|
451
515
|
|
452
516
|
def save_data(self):
|
meerk40t/dxf/dxf_io.py
CHANGED
@@ -132,6 +132,7 @@ class DXFProcessor:
|
|
132
132
|
# else, is within the bed dimensions correctly, change nothing.
|
133
133
|
if self.elements.classify_new:
|
134
134
|
self.elements.classify(self.elements_list)
|
135
|
+
self.elements.signal("element_property_update", self.elements_list)
|
135
136
|
return True
|
136
137
|
|
137
138
|
def check_for_attributes(self, node, entity):
|
@@ -156,6 +157,47 @@ class DXFProcessor:
|
|
156
157
|
except Exception:
|
157
158
|
color = Color("black")
|
158
159
|
node.stroke = color
|
160
|
+
if hasattr(entity.dxf, "layer"):
|
161
|
+
# For some reason, the layer is not available in the dxf entity.
|
162
|
+
# This happens with LibreCad 2.2.0 and 2.2.1.
|
163
|
+
# So we try to get it from the layer table.
|
164
|
+
if entity.dxf.layer in dxf.layers:
|
165
|
+
s_layer = entity.dxf.layer
|
166
|
+
else:
|
167
|
+
s_layer = ""
|
168
|
+
assign_type = ""
|
169
|
+
if "ENGRAVE" in s_layer.upper() or "ENGRAVE" in entity.dxf.layer.upper():
|
170
|
+
assign_type = "op engrave"
|
171
|
+
elif "CUT" in s_layer.upper() or "CUT" in entity.dxf.layer.upper():
|
172
|
+
assign_type = "op cut"
|
173
|
+
# print (f"Layer: {s_layer} ({entity.dxf.layer}), assign_type: {assign_type}")
|
174
|
+
node.label = s_layer
|
175
|
+
if assign_type:
|
176
|
+
if s_layer == "":
|
177
|
+
s_layer = entity.dxf.layer
|
178
|
+
# We look for a proper op to assign the node to it
|
179
|
+
first_op = None
|
180
|
+
found = False
|
181
|
+
for op in self.elements.ops():
|
182
|
+
if op.type != assign_type:
|
183
|
+
continue
|
184
|
+
if first_op is None:
|
185
|
+
first_op = op
|
186
|
+
if op.color == node.stroke or op.label == s_layer:
|
187
|
+
# We found an engrave op with the same color
|
188
|
+
op.add_reference(node)
|
189
|
+
found = True
|
190
|
+
break
|
191
|
+
if not found:
|
192
|
+
if first_op is None:
|
193
|
+
first_op = self.elements.op_branch.add(
|
194
|
+
type=assign_type,
|
195
|
+
color=node.stroke,
|
196
|
+
label=s_layer
|
197
|
+
)
|
198
|
+
# We did not find a proper match, so we assign it to the first engrave/cut op
|
199
|
+
first_op.add_reference(node)
|
200
|
+
|
159
201
|
|
160
202
|
# def debug_entity(self, entity):
|
161
203
|
# print (f"Entity: {entity.dxftype()}")
|
meerk40t/grbl/controller.py
CHANGED
@@ -29,73 +29,277 @@ def hardware_settings(code):
|
|
29
29
|
@return: parameter, units
|
30
30
|
"""
|
31
31
|
if code == 0:
|
32
|
-
return
|
32
|
+
return (
|
33
|
+
10,
|
34
|
+
"step pulse time",
|
35
|
+
"microseconds",
|
36
|
+
float,
|
37
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#0--step-pulse-microseconds",
|
38
|
+
)
|
33
39
|
if code == 1:
|
34
|
-
return
|
40
|
+
return (
|
41
|
+
25,
|
42
|
+
"step idle delay",
|
43
|
+
"milliseconds",
|
44
|
+
float,
|
45
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#1---step-idle-delay-milliseconds",
|
46
|
+
)
|
35
47
|
if code == 2:
|
36
|
-
return
|
48
|
+
return (
|
49
|
+
0,
|
50
|
+
"step pulse invert",
|
51
|
+
"bitmask",
|
52
|
+
int,
|
53
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#2--step-port-invert-mask",
|
54
|
+
)
|
37
55
|
if code == 3:
|
38
|
-
return
|
56
|
+
return (
|
57
|
+
0,
|
58
|
+
"step direction invert",
|
59
|
+
"bitmask",
|
60
|
+
int,
|
61
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#3--direction-port-invert-mask",
|
62
|
+
)
|
39
63
|
if code == 4:
|
40
|
-
return
|
64
|
+
return (
|
65
|
+
0,
|
66
|
+
"invert step enable pin",
|
67
|
+
"boolean",
|
68
|
+
int,
|
69
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#4---step-enable-invert-boolean",
|
70
|
+
)
|
41
71
|
if code == 5:
|
42
|
-
return
|
72
|
+
return (
|
73
|
+
0,
|
74
|
+
"invert limit pins",
|
75
|
+
"boolean",
|
76
|
+
int,
|
77
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#5----limit-pins-invert-boolean",
|
78
|
+
)
|
43
79
|
if code == 6:
|
44
|
-
return
|
80
|
+
return (
|
81
|
+
0,
|
82
|
+
"invert probe pin",
|
83
|
+
"boolean",
|
84
|
+
int,
|
85
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#6----probe-pin-invert-boolean",
|
86
|
+
)
|
45
87
|
if code == 10:
|
46
|
-
return
|
88
|
+
return (
|
89
|
+
255,
|
90
|
+
"status report options",
|
91
|
+
"bitmask",
|
92
|
+
int,
|
93
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#10---status-report-mask",
|
94
|
+
)
|
47
95
|
if code == 11:
|
48
|
-
return
|
96
|
+
return (
|
97
|
+
0.010,
|
98
|
+
"Junction deviation",
|
99
|
+
"mm",
|
100
|
+
float,
|
101
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#11---junction-deviation-mm",
|
102
|
+
)
|
49
103
|
if code == 12:
|
50
|
-
return
|
104
|
+
return (
|
105
|
+
0.002,
|
106
|
+
"arc tolerance",
|
107
|
+
"mm",
|
108
|
+
float,
|
109
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#12--arc-tolerance-mm",
|
110
|
+
)
|
51
111
|
if code == 13:
|
52
|
-
return
|
112
|
+
return (
|
113
|
+
0,
|
114
|
+
"Report in inches",
|
115
|
+
"boolean",
|
116
|
+
int,
|
117
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#13---report-inches-boolean",
|
118
|
+
)
|
53
119
|
if code == 20:
|
54
|
-
return
|
120
|
+
return (
|
121
|
+
0,
|
122
|
+
"Soft limits enabled",
|
123
|
+
"boolean",
|
124
|
+
int,
|
125
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#20---soft-limits-boolean",
|
126
|
+
)
|
55
127
|
if code == 21:
|
56
|
-
return
|
128
|
+
return (
|
129
|
+
0,
|
130
|
+
"hard limits enabled",
|
131
|
+
"boolean",
|
132
|
+
int,
|
133
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#21---hard-limits-boolean",
|
134
|
+
)
|
57
135
|
if code == 22:
|
58
|
-
return
|
136
|
+
return (
|
137
|
+
0,
|
138
|
+
"Homing cycle enable",
|
139
|
+
"boolean",
|
140
|
+
int,
|
141
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#22---homing-cycle-boolean",
|
142
|
+
)
|
59
143
|
if code == 23:
|
60
|
-
return
|
144
|
+
return (
|
145
|
+
0,
|
146
|
+
"Homing direction invert",
|
147
|
+
"bitmask",
|
148
|
+
int,
|
149
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#23---homing-dir-invert-mask",
|
150
|
+
)
|
61
151
|
if code == 24:
|
62
|
-
return
|
152
|
+
return (
|
153
|
+
25.000,
|
154
|
+
"Homing locate feed rate",
|
155
|
+
"mm/min",
|
156
|
+
float,
|
157
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#24---homing-feed-mmmin",
|
158
|
+
)
|
63
159
|
if code == 25:
|
64
|
-
return
|
160
|
+
return (
|
161
|
+
500.000,
|
162
|
+
"Homing search seek rate",
|
163
|
+
"mm/min",
|
164
|
+
float,
|
165
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#25---homing-seek-mmmin",
|
166
|
+
)
|
65
167
|
if code == 26:
|
66
|
-
return
|
168
|
+
return (
|
169
|
+
250,
|
170
|
+
"Homing switch debounce delay",
|
171
|
+
"ms",
|
172
|
+
float,
|
173
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#26---homing-debounce-milliseconds",
|
174
|
+
)
|
67
175
|
if code == 27:
|
68
|
-
return
|
176
|
+
return (
|
177
|
+
1.000,
|
178
|
+
"Homing switch pull-off distance",
|
179
|
+
"mm",
|
180
|
+
float,
|
181
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#27---homing-pull-off-mm",
|
182
|
+
)
|
69
183
|
if code == 30:
|
70
|
-
return
|
184
|
+
return (
|
185
|
+
1000,
|
186
|
+
"Maximum spindle speed",
|
187
|
+
"RPM",
|
188
|
+
float,
|
189
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#30---max-spindle-speed-rpm",
|
190
|
+
)
|
71
191
|
if code == 31:
|
72
|
-
return
|
192
|
+
return (
|
193
|
+
0,
|
194
|
+
"Minimum spindle speed",
|
195
|
+
"RPM",
|
196
|
+
float,
|
197
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#31---min-spindle-speed-rpm",
|
198
|
+
)
|
73
199
|
if code == 32:
|
74
|
-
return
|
200
|
+
return (
|
201
|
+
1,
|
202
|
+
"Laser mode enable",
|
203
|
+
"boolean",
|
204
|
+
int,
|
205
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#32---laser-mode-boolean",
|
206
|
+
)
|
75
207
|
if code == 100:
|
76
|
-
return
|
208
|
+
return (
|
209
|
+
250.000,
|
210
|
+
"X-axis steps per millimeter",
|
211
|
+
"steps",
|
212
|
+
float,
|
213
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#100-101-and-102--xyz-stepsmm",
|
214
|
+
)
|
77
215
|
if code == 101:
|
78
|
-
return
|
216
|
+
return (
|
217
|
+
250.000,
|
218
|
+
"Y-axis steps per millimeter",
|
219
|
+
"steps",
|
220
|
+
float,
|
221
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#100-101-and-102--xyz-stepsmm",
|
222
|
+
)
|
79
223
|
if code == 102:
|
80
|
-
return
|
224
|
+
return (
|
225
|
+
250.000,
|
226
|
+
"Z-axis steps per millimeter",
|
227
|
+
"steps",
|
228
|
+
float,
|
229
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#100-101-and-102--xyz-stepsmm",
|
230
|
+
)
|
81
231
|
if code == 110:
|
82
|
-
return
|
232
|
+
return (
|
233
|
+
500.000,
|
234
|
+
"X-axis max rate",
|
235
|
+
"mm/min",
|
236
|
+
float,
|
237
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#110-111-and-112--xyz-max-rate-mmmin",
|
238
|
+
)
|
83
239
|
if code == 111:
|
84
|
-
return
|
240
|
+
return (
|
241
|
+
500.000,
|
242
|
+
"Y-axis max rate",
|
243
|
+
"mm/min",
|
244
|
+
float,
|
245
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#110-111-and-112--xyz-max-rate-mmmin",
|
246
|
+
)
|
85
247
|
if code == 112:
|
86
|
-
return
|
248
|
+
return (
|
249
|
+
500.000,
|
250
|
+
"Z-axis max rate",
|
251
|
+
"mm/min",
|
252
|
+
float,
|
253
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#110-111-and-112--xyz-max-rate-mmmin",
|
254
|
+
)
|
87
255
|
if code == 120:
|
88
|
-
return
|
256
|
+
return (
|
257
|
+
10.000,
|
258
|
+
"X-axis acceleration",
|
259
|
+
"mm/s^2",
|
260
|
+
float,
|
261
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#120-121-122--xyz-acceleration-mmsec2",
|
262
|
+
)
|
89
263
|
if code == 121:
|
90
|
-
return
|
264
|
+
return (
|
265
|
+
10.000,
|
266
|
+
"Y-axis acceleration",
|
267
|
+
"mm/s^2",
|
268
|
+
float,
|
269
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#120-121-122--xyz-acceleration-mmsec2",
|
270
|
+
)
|
91
271
|
if code == 122:
|
92
|
-
return
|
272
|
+
return (
|
273
|
+
10.000,
|
274
|
+
"Z-axis acceleration",
|
275
|
+
"mm/s^2",
|
276
|
+
float,
|
277
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#120-121-122--xyz-acceleration-mmsec2",
|
278
|
+
)
|
93
279
|
if code == 130:
|
94
|
-
return
|
280
|
+
return (
|
281
|
+
200.000,
|
282
|
+
"X-axis max travel",
|
283
|
+
"mm",
|
284
|
+
float,
|
285
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#130-131-132--xyz-max-travel-mm",
|
286
|
+
)
|
95
287
|
if code == 131:
|
96
|
-
return
|
288
|
+
return (
|
289
|
+
200.000,
|
290
|
+
"Y-axis max travel",
|
291
|
+
"mm",
|
292
|
+
float,
|
293
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#130-131-132--xyz-max-travel-mm",
|
294
|
+
)
|
97
295
|
if code == 132:
|
98
|
-
return
|
296
|
+
return (
|
297
|
+
200.000,
|
298
|
+
"Z-axis max travel",
|
299
|
+
"mm",
|
300
|
+
float,
|
301
|
+
"https://github.com/gnea/grbl/blob/master/doc/markdown/settings.md#130-131-132--xyz-max-travel-mm",
|
302
|
+
)
|
99
303
|
|
100
304
|
|
101
305
|
def grbl_error_code(code):
|
@@ -318,10 +522,13 @@ class GrblController:
|
|
318
522
|
self.connection = TCPOutput(self.service, self)
|
319
523
|
elif self.service.permit_ws and self.service.interface == "ws":
|
320
524
|
from meerk40t.grbl.ws_connection import WSOutput
|
525
|
+
|
321
526
|
try:
|
322
527
|
self.connection = WSOutput(self.service, self)
|
323
528
|
except ModuleNotFoundError:
|
324
|
-
response = self.service.kernel.prompt(
|
529
|
+
response = self.service.kernel.prompt(
|
530
|
+
str, "Could not open websocket-connection (websocket installed?)"
|
531
|
+
)
|
325
532
|
else:
|
326
533
|
# Mock
|
327
534
|
from .mock_connection import MockConnection
|
@@ -908,6 +1115,9 @@ class GrblController:
|
|
908
1115
|
message = response[5:-1]
|
909
1116
|
opts = list(message.split(","))
|
910
1117
|
codes = opts[0]
|
1118
|
+
if len(opts) < 3:
|
1119
|
+
# If there are not enough options, we assume the defaults.
|
1120
|
+
opts.extend(["0", "0"])
|
911
1121
|
block_buffer_size = opts[1]
|
912
1122
|
rx_buffer_size = opts[2]
|
913
1123
|
self.log(f"codes: {codes}", type="event")
|