Skip to content

Commit

Permalink
axis: Fix reload of preview after touch off
Browse files Browse the repository at this point in the history
.. see the added comment for more information

Close: #269

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
  • Loading branch information
jepler committed May 15, 2017
1 parent d63aca6 commit cb74ca8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/emc/usr_intf/axis/scripts/axis.py
Expand Up @@ -1180,7 +1180,12 @@ def open_file_guts(f, filtered=False, addrecent=True):
if s.axis_mask & (1<<i):
position += " %s%.8f" % ("XYZABCUVW"[i], s.position[i])
initcodes.append(position)
for g in s.gcodes[1:]:
for i, g in enumerate(s.gcodes):
# index 0 is "sequence number" and index 2 is the last block's
# "g_mode" neither of which should be sent as a startup code.
# In particular, after issuing a non-modal G like G10, that
# will appear at s.gcodes[2] which caused issue #269
if i in (0, 2): continue
if g == -1: continue
initcodes.append("G%.1f" % (g * .1))
tool_offset = "G43.1"
Expand Down

0 comments on commit cb74ca8

Please sign in to comment.