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:
sliptonic
2016-06-08 08:57:36 -05:00
parent f55fb8cb99
commit dff173cd1f
7 changed files with 81 additions and 29 deletions

View File

@@ -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: