Fixes for various gcode errors
Some operations were still outputting even if disabled. Nested comments caused trouble in linuxcnc Machine was producing an initial move that was potentially dangerous
This commit is contained in:
@@ -157,10 +157,12 @@ class ObjectRemote:
|
||||
obj.proplist = pl
|
||||
|
||||
if prop == "UserLabel":
|
||||
obj.Label = obj.UserLabel + " (" + obj.ToolDescription + ")"
|
||||
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
||||
|
||||
def execute(self, obj):
|
||||
output = ""
|
||||
if obj.Comment != "":
|
||||
output += '(' + str(obj.Comment)+')\n'
|
||||
|
||||
toolLoad = PathUtils.getLastToolLoad(obj)
|
||||
if toolLoad is None or toolLoad.ToolNumber == 0:
|
||||
@@ -178,13 +180,21 @@ class ObjectRemote:
|
||||
obj.ToolDescription = toolLoad.Name
|
||||
|
||||
if obj.UserLabel == "":
|
||||
obj.Label = obj.Name + " (" + obj.ToolDescription + ")"
|
||||
obj.Label = obj.Name + " :" + obj.ToolDescription
|
||||
else:
|
||||
obj.Label = obj.UserLabel + " (" + obj.ToolDescription + ")"
|
||||
obj.Label = obj.UserLabel + " :" + obj.ToolDescription
|
||||
|
||||
output += "(remote gcode goes here)"
|
||||
path = Path.Path(output)
|
||||
obj.Path = path
|
||||
|
||||
if obj.Active:
|
||||
path = Path.Path(output)
|
||||
obj.Path = path
|
||||
obj.ViewObject.Visibility = True
|
||||
|
||||
else:
|
||||
path = Path.Path("(inactive operation)")
|
||||
obj.Path = path
|
||||
obj.ViewObject.Visibility = False
|
||||
|
||||
|
||||
class ViewProviderRemote:
|
||||
|
||||
Reference in New Issue
Block a user