Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #404 from gmoccapy/master
Browse files Browse the repository at this point in the history
gmoccapy_1_3_5_1 - updated to current version
  • Loading branch information
mhaberler committed Dec 29, 2014
2 parents a58f81e + e2e2617 commit d419103
Show file tree
Hide file tree
Showing 4 changed files with 615 additions and 1,329 deletions.
11 changes: 7 additions & 4 deletions lib/python/gladevcp/hal_gremlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
class HAL_Gremlin(gremlin.Gremlin, _EMC_ActionBase):
__gtype_name__ = "HAL_Gremlin"
__gsignals__ = {
'line-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_INT,))
'line-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_INT,)),
'gcode_error': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_STRING,)),
}

__gproperties__ = {
'view' : ( gobject.TYPE_STRING, 'View type', 'Default view: p, x, y, y2, z, z2',
'p', gobject.PARAM_READWRITE | gobject.PARAM_CONSTRUCT),
Expand Down Expand Up @@ -243,8 +245,9 @@ def realize(self, widget):
def _load(self, filename):
return self.load(filename)

# TODO fix this so it doesn't print twice and it should probably pop up a dialog
def report_gcode_error(self, result, seq, filename):
error_str = gcode.strerror(result)
print("G-Code error in " + os.path.basename(filename) + "\n" + "Near line "
+ str(seq) + " of\n" + filename + "\n" + error_str + "\n")
errortext = "G-Code error in " + os.path.basename(filename) + "\n" + "Near line " \
+ str(seq) + " of\n" + filename + "\n" + error_str + "\n"
print(errortext)
self.emit("gcode-error", errortext)

0 comments on commit d419103

Please sign in to comment.