Commit 635686fa authored by electrolab's avatar electrolab

Connect all homing command signals to genuine gmoccapy buttons, and remove temporary panel

parent 1cafec69
net X-homed => halui.joint.0.home
net Z-homed => halui.joint.2.home
net Home-All <= gmoccapy.joint.all.home
net Home-X <= gmoccapy.joint.0.home
net Home-Z <= gmoccapy.joint.2.home
......@@ -9,11 +9,11 @@ MACHINE = EtherCAT Machine
DEBUG = 1
[DISPLAY]
DISPLAY = gmoccapy
DISPLAY = ./maurice_gmoccapy.py
EMBED_TAB_NAME = right_side_panel
EMBED_TAB_LOCATION = box_custom_4
EMBED_TAB_COMMAND = gladevcp -x {XID} -H vcp_box.hal vcp_box.glade
#EMBED_TAB_NAME = right_side_panel
#EMBED_TAB_LOCATION = box_custom_4
#EMBED_TAB_COMMAND = gladevcp -x {XID} -H vcp_box.hal vcp_box.glade
PREFERENCE_FILE_PATH = gmoccapy_preferences
LATHE = 1
......
......@@ -110,7 +110,8 @@ _BB_LOAD_FILE = 8
_TEMPDIR = tempfile.gettempdir() # Now we know where the tempdir is, usualy /tmp
# set up paths to files
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
#BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
BASE = "/usr" # Maurice local gmoccapy
LIBDIR = os.path.join(BASE, "lib", "python")
sys.path.insert(0, LIBDIR)
......@@ -3583,7 +3584,10 @@ class gmoccapy(object):
def on_btn_home_all_clicked(self, widget, data=None):
self._set_motion_mode(0)
# home -1 means all
self.command.home(-1)
#self.command.home(-1)
# Maurice homing
self.halcomp["joint.all.home"] = 1
self.halcomp["joint.all.home"] = 0
def _on_btn_unhome_clicked(self, widget):
self._set_motion_mode(0)
......@@ -3608,8 +3612,15 @@ class gmoccapy(object):
joint_or_axis = -1
self._set_motion_mode(0)
self.command.home(joint_or_axis)
#self.command.home(joint_or_axis)
# Maurice homing
if joint_axis == 1:
home_pin = "joint.all.home"
else:
home_pin = "joint.%d.home" % (joint_axis)
self.halcomp[home_pin] = 1
self.halcomp[home_pin] = 0
def _unhome_signal(self, object, joint):
self._set_motion_mode(0)
self.all_homed = False
......@@ -5181,6 +5192,11 @@ class gmoccapy(object):
# make a pin to set ignore limits
pin = self.halcomp.newpin("ignore-limits", hal.HAL_BIT, hal.HAL_IN)
hal_glib.GPin(pin).connect("value_changed", self._ignore_limits)
# make pins for Maurice lathe
self.halcomp.newpin("joint.all.home", hal.HAL_BIT, hal.HAL_OUT)
self.halcomp.newpin("joint.0.home", hal.HAL_BIT, hal.HAL_OUT)
self.halcomp.newpin("joint.2.home", hal.HAL_BIT, hal.HAL_OUT)
# Hal Pin Handling End
# =========================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment