From 9f832f679040beb769194ff372f7e724ccca5844 Mon Sep 17 00:00:00 2001 From: Chris Morley Date: Sat, 20 Jun 2020 23:27:59 -0700 Subject: [PATCH 1/2] hal_glib -add homing to force_update function --- lib/python/hal_glib.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/python/hal_glib.py b/lib/python/hal_glib.py index 0dee7f732c9..d88c759584f 100644 --- a/lib/python/hal_glib.py +++ b/lib/python/hal_glib.py @@ -735,6 +735,23 @@ def forced_update(self): tool_info_new = self.old['tool-info'] self.emit('tool-info-changed', tool_info_new) + # homing + homed_joints = 0 + unhomed_joints = "" + for joint in range(0, self.stat.joints): + if self.stat.homed[joint]: + homed_joints += 1 + self.emit('homed', joint) + else: + self.emit('unhomed', joint) + unhomed_joints += str(joint) + if homed_joints == self.stat.joints: + self._is_all_homed = True + self.emit('all-homed') + else: + self._is_all_homed = False + self.emit('not-all-homed', unhomed_joints) + # update external ojects self.emit('forced-update') From 2f875d6a3ada8147d504536feb34e0d0d225f20e Mon Sep 17 00:00:00 2001 From: Chris Morley Date: Sat, 20 Jun 2020 23:39:17 -0700 Subject: [PATCH 2/2] qtvcp -qtlathe: allows keybindings through eg F12 stylesheet editor was blocked --- share/qtvcp/screens/qtlathe/qtlathe_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qtvcp/screens/qtlathe/qtlathe_handler.py b/share/qtvcp/screens/qtlathe/qtlathe_handler.py index c1ab040bba8..bbabdfe6a86 100644 --- a/share/qtvcp/screens/qtlathe/qtlathe_handler.py +++ b/share/qtvcp/screens/qtlathe/qtlathe_handler.py @@ -106,7 +106,8 @@ def processed_key_event__(self,receiver,event,is_pressed,key,code,shift,cntrl): # so we catch and process the events directly. # We do want ESC, F1 and F2 to call keybinding functions though if code not in(QtCore.Qt.Key_Escape,QtCore.Qt.Key_F1 ,QtCore.Qt.Key_F2, - QtCore.Qt.Key_F3,QtCore.Qt.Key_F5,QtCore.Qt.Key_F5): + QtCore.Qt.Key_F3,QtCore.Qt.Key_F4,QtCore.Qt.Key_F5, + QtCore.Qt.Key_F6,QtCore.Qt.Key_F7,QtCore.Qt.Key_F12): raise # ok if we got here then try keybindings