equal
deleted
inserted
replaced
40 |
40 |
41 |
41 |
42 def EntryName(context, *args): |
42 def EntryName(context, *args): |
43 return ExtractName(args[0], |
43 return ExtractName(args[0], |
44 args[1][0] if len(args) > 1 else None) |
44 args[1][0] if len(args) > 1 else None) |
|
45 |
45 |
46 |
46 ENTRY_INFOS_KEYS = [ |
47 ENTRY_INFOS_KEYS = [ |
47 ("Index", lambda x: "#x%4.4X" % int(x), "#x0000"), |
48 ("Index", lambda x: "#x%4.4X" % int(x), "#x0000"), |
48 ("SubIndex", str, "0"), |
49 ("SubIndex", str, "0"), |
49 ("Name", str, ""), |
50 ("Name", str, ""), |
75 value = new_entry_infos.get(param) |
76 value = new_entry_infos.get(param) |
76 if value is not None: |
77 if value is not None: |
77 entry_infos[param] = value |
78 entry_infos[param] = value |
78 else: |
79 else: |
79 self.Entries[(index, subindex)] = new_entry_infos |
80 self.Entries[(index, subindex)] = new_entry_infos |
|
81 |
80 |
82 |
81 entries_list_xslt = etree.parse( |
83 entries_list_xslt = etree.parse( |
82 os.path.join(ScriptDirectory, "entries_list.xslt")) |
84 os.path.join(ScriptDirectory, "entries_list.xslt")) |
83 |
85 |
84 cls = EtherCATInfoParser.GetElementClass("DeviceType") |
86 cls = EtherCATInfoParser.GetElementClass("DeviceType") |
381 for param, param_infos in self.MODULES_EXTRA_PARAMS: |
383 for param, param_infos in self.MODULES_EXTRA_PARAMS: |
382 extra_params.setdefault(param, param_infos["default"]) |
384 extra_params.setdefault(param, param_infos["default"]) |
383 |
385 |
384 return extra_params |
386 return extra_params |
385 |
387 |
|
388 |
386 USERDATA_DIR = wx.StandardPaths.Get().GetUserDataDir() |
389 USERDATA_DIR = wx.StandardPaths.Get().GetUserDataDir() |
387 if wx.Platform != '__WXMSW__': |
390 if wx.Platform != '__WXMSW__': |
388 USERDATA_DIR += '_files' |
391 USERDATA_DIR += '_files' |
389 |
392 |
390 ModulesDatabase = ModulesLibrary( |
393 ModulesDatabase = ModulesLibrary( |