# HG changeset patch # User Laurent Bessard # Date 1368168245 -7200 # Node ID a8b095de63e839c17608ea895adbc88e4121af48 # Parent 0c65c96a83799cd29eaade9d375c7ed867db6850 Fix bug in when moving Ethercat slaves fixed diff -r 0c65c96a8379 -r a8b095de63e8 etherlab/ConfigEditor.py --- a/etherlab/ConfigEditor.py Wed May 08 10:40:06 2013 +0200 +++ b/etherlab/ConfigEditor.py Fri May 10 08:44:05 2013 +0200 @@ -11,6 +11,7 @@ from controls import CustomGrid, CustomTable, FolderTree from editors.ConfTreeNodeEditor import ConfTreeNodeEditor, SCROLLBAR_UNIT from util.BitmapLibrary import GetBitmap +from controls.CustomStyledTextCtrl import NAVIGATION_KEYS [ETHERCAT_VENDOR, ETHERCAT_GROUP, ETHERCAT_DEVICE] = range(3) @@ -50,24 +51,6 @@ ETHERCAT_SUBINDEX_MODEL = re.compile("#x([0-9a-fA-F]{0,2})$") LOCATION_MODEL = re.compile("(?:%[IQM](?:[XBWLD]?([0-9]+(?:\.[0-9]+)*)))$") -NAVIGATION_KEYS = [ - wx.WXK_END, - wx.WXK_HOME, - wx.WXK_LEFT, - wx.WXK_UP, - wx.WXK_RIGHT, - wx.WXK_DOWN, - wx.WXK_PAGEUP, - wx.WXK_PAGEDOWN, - wx.WXK_NUMPAD_HOME, - wx.WXK_NUMPAD_LEFT, - wx.WXK_NUMPAD_UP, - wx.WXK_NUMPAD_RIGHT, - wx.WXK_NUMPAD_DOWN, - wx.WXK_NUMPAD_PAGEUP, - wx.WXK_NUMPAD_PAGEDOWN, - wx.WXK_NUMPAD_END] - class NodeVariablesSizer(wx.FlexGridSizer): def __init__(self, parent, controler, position_column=False): diff -r 0c65c96a8379 -r a8b095de63e8 etherlab/EthercatCIA402Slave.py --- a/etherlab/EthercatCIA402Slave.py Wed May 08 10:40:06 2013 +0200 +++ b/etherlab/EthercatCIA402Slave.py Fri May 10 08:44:05 2013 +0200 @@ -134,8 +134,8 @@ def CTNGlobalInstances(self): current_location = self.GetCurrentLocation() - return [("%s_%s" % (block_infos["blocktype"], "_".join(map(str, current_location))), - "EtherLab%s" % block_infos["blocktype"]) for block_infos in GLOBAL_INSTANCES] + return [("%s_%s" % (block_infos["blocktype"], "_".join(map(str, current_location)), None), + "EtherLab%s" % block_infos["blocktype"], "") for block_infos in GLOBAL_INSTANCES] def _getCIA402AxisRef(self): data = wx.TextDataObject(str(("%%IW%s.0" % ".".join(map(str, self.GetCurrentLocation())), diff -r 0c65c96a8379 -r a8b095de63e8 etherlab/EthercatMaster.py --- a/etherlab/EthercatMaster.py Wed May 08 10:40:06 2013 +0200 +++ b/etherlab/EthercatMaster.py Fri May 10 08:44:05 2013 +0200 @@ -484,7 +484,7 @@ if write_to is not None and write_to.getPosition() == slave_pos: write_to.setPosition(new_pos) self.CreateBuffer(True) - self.OnCTNSave() + self.CTNRequestSave() if self._View is not None: self._View.RefreshView() self._View.RefreshBuffer()