Skip to content

Commit

Permalink
Gmoccapy: fix bugs caused by GStat missing changes in interpreter mode
Browse files Browse the repository at this point in the history
This fixes issues LinuxCNC#3120 and LinuxCNC#3129
  • Loading branch information
Sigma1912 authored Jan 13, 2025
1 parent a3b4071 commit eba8a99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5016,7 +5016,10 @@ def on_btn_select_tool_by_no_clicked(self, widget, data=None):
self.command.wait_complete()
command = "T{0} M6".format(int(value))
self.command.mdi(command)

# Next two lines fix issue #3129 caused by GStat missing changes in interpreter mode
command = "G4 P{0}".format(self.get_ini_info.get_cycle_time()/1000)
self.command.mdi(command)

# set tool with M61 Q? or with T? M6
def on_btn_selected_tool_clicked(self, widget, data=None):
tool = self.widgets.tooledit1.get_selected_tool()
Expand All @@ -5039,6 +5042,9 @@ def on_btn_selected_tool_clicked(self, widget, data=None):
else:
command = "M61 Q{0}".format(tool)
self.command.mdi(command)
# Next two lines fix issue #3120 also caused by GStat missing changes in interpreter mode
command = "G4 P{0}".format(self.get_ini_info.get_cycle_time()/1000)
self.command.mdi(command)
else:
message = _("Could not understand the entered tool number. Will not change anything!")
self.dialogs.warning_dialog(self, _("Important Warning!"), message)
Expand Down

0 comments on commit eba8a99

Please sign in to comment.