--- a/etherlab/ConfigEditor.py Thu Dec 22 14:52:18 2011 +0900
+++ b/etherlab/ConfigEditor.py Tue Jan 10 15:11:22 2012 +0100
@@ -1,4 +1,5 @@
import wx
+import wx.grid
from controls import CustomGrid, CustomTable, EditorPanel
@@ -323,9 +324,6 @@
self.RefreshView()
- def __del__(self):
- self.Controler.OnCloseEditor()
-
def GetSlaveTitle(self):
type_infos = self.Controler.GetSlaveType(self.Slave)
return "%s (%d:%d)" % (type_infos["device_type"], self.Slave[0], self.Slave[1])
@@ -469,7 +467,10 @@
img = wx.Bitmap(self.Controler.GetIconPath("Cfile.png"), wx.BITMAP_TYPE_PNG).ConvertToImage()
self.SetIcon(wx.BitmapFromImage(img.Rescale(16, 16)))
-
+
+ def __del__(self):
+ self.Controler.OnCloseEditor()
+
def GetTitle(self):
fullname = self.Controler.PlugFullName()
if not self.Controler.ConfigIsSaved():
--- a/etherlab/etherlab.py Thu Dec 22 14:52:18 2011 +0900
+++ b/etherlab/etherlab.py Tue Jan 10 15:11:22 2012 +0100
@@ -239,10 +239,13 @@
else:
var_dir = "%Q"
- vars.append({"name": "%s - %s" % (ExtractName(pdo.getName()), ExtractName(entry.getName())),
+ pdo_name = ExtractName(pdo.getName())
+ entry_name = ExtractName(entry.getName())
+ vars.append({"name": "%s - %s" % (pdo_name, entry_name),
"type": var_class,
"size": var_size,
"IEC_type": var_type,
+ "var_name": "%s_%s" % (type_infos["device_type"], "_".join(pdo_name.split())),
"location": "%s%s%s"%(var_dir, var_size, ".".join(map(str, current_location +
slave_pos +
(index, subindex)))),
--- a/etherlab/plc_etherlab.c Thu Dec 22 14:52:18 2011 +0900
+++ b/etherlab/plc_etherlab.c Tue Jan 10 15:11:22 2012 +0100
@@ -100,6 +100,7 @@
if (rt_fd >= 0) {
rt_dev_close(rt_fd);
}
+ //release master
ecrt_release_master(master);
}