Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmoccapy - new HAL pin disable_automatic_G43 #2571

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3537,11 +3537,14 @@ def _update_toolinfo(self, tool):
self.on_hal_status_interp_idle(None)
return

# automatic run command "G43"
if "G43" in self.active_gcodes and self.stat.task_mode != linuxcnc.MODE_AUTO:
self.command.mode(linuxcnc.MODE_MDI)
self.command.wait_complete()
self.command.mdi("G43")
self.command.wait_complete()
if not hal.get_value("gmoccapy.disable_automatic_G43"):
self.command.mode(linuxcnc.MODE_MDI)
self.command.wait_complete()
self.command.mdi("G43")
self.command.wait_complete()
LOG.debug("automatic run command G43 was executed ")

def _set_enable_tooltips(self, value):
LOG.debug("_set_enable_tooltips = {0}".format(value))
Expand Down Expand Up @@ -5686,6 +5689,10 @@ def _make_hal_pins(self):
hal_glib.GPin(pin).connect('value_changed', self.on_tool_change)
self.halcomp.newpin('toolchange-confirm', hal.HAL_BIT, hal.HAL_IN)

# make a pin to disable automatic run command "G43" after toolchange
# automatic run command "G43" can cause run condition
self.halcomp.newpin("disable_automatic_G43", hal.HAL_BIT, hal.HAL_IN)

# make a pin to confirm a warning dialog
self.halcomp.newpin('warning-confirm', hal.HAL_BIT, hal.HAL_IN)

Expand Down