# HG changeset patch # User Andrey Skvortsov # Date 1538152216 -10800 # Node ID e40f3914e55f5c7fbac24caec5c7ae899a64791c # Parent 24db1e592e20fc7e2bd2989eea0163fe059e3601 cleanup etherlab: pep8, E305 expected 2 blank lines after class or function definition, found X diff -r 24db1e592e20 -r e40f3914e55f etherlab/CommonEtherCATFunction.py --- a/etherlab/CommonEtherCATFunction.py Fri Sep 28 19:25:18 2018 +0300 +++ b/etherlab/CommonEtherCATFunction.py Fri Sep 28 19:30:16 2018 +0300 @@ -50,6 +50,7 @@ # Remote Exec Etherlab Commands # -------------------------------------------------- + # --------------------- for master --------------------------- MASTER_STATE = """ import commands diff -r 24db1e592e20 -r e40f3914e55f etherlab/ConfigEditor.py --- a/etherlab/ConfigEditor.py Fri Sep 28 19:25:18 2018 +0300 +++ b/etherlab/ConfigEditor.py Fri Sep 28 19:30:16 2018 +0300 @@ -45,6 +45,7 @@ colname.append(_("Position")) return colname + [_("Name"), _("Index"), _("SubIndex"), _("Type"), _("Access")] + ACCESS_TYPES = { 'ro': 'R', 'wo': 'W', @@ -57,6 +58,7 @@ value += ", PDO: %s" % pdo_mapping return value + VARIABLES_FILTERS = [ (_("All"), (0x0000, 0xffff)), (_("Communication Parameters"), (0x1000, 0x1fff)), @@ -328,6 +330,7 @@ event.Skip() # ------------------------------------------------------------------------------------------------------- + CIA402NodeEditor = NodeEditor @@ -595,6 +598,7 @@ entries = self.Controler.GetNodesVariables(**args) self.RefreshVariablesGrid(entries) + NODE_POSITION_FILTER_FORMAT = _("Node Position: %d") diff -r 24db1e592e20 -r e40f3914e55f etherlab/EthercatMaster.py --- a/etherlab/EthercatMaster.py Fri Sep 28 19:25:18 2018 +0300 +++ b/etherlab/EthercatMaster.py Fri Sep 28 19:30:16 2018 +0300 @@ -95,6 +95,7 @@ # Ethercat MASTER # -------------------------------------------------- + EtherCATConfigParser = GenerateParserFromXSD(os.path.join(os.path.dirname(__file__), "EtherCATConfig.xsd")) @@ -103,6 +104,7 @@ return cmp(x["Subindex"], y["Subindex"]) return cmp(x["Index"], y["Index"]) + cls = EtherCATConfigParser.GetElementClass("Slave", "Config") if cls: diff -r 24db1e592e20 -r e40f3914e55f etherlab/etherlab.py --- a/etherlab/etherlab.py Fri Sep 28 19:25:18 2018 +0300 +++ b/etherlab/etherlab.py Fri Sep 28 19:30:16 2018 +0300 @@ -43,6 +43,7 @@ return ExtractName(args[0], args[1][0] if len(args) > 1 else None) + ENTRY_INFOS_KEYS = [ ("Index", lambda x: "#x%4.4X" % int(x), "#x0000"), ("SubIndex", str, "0"), @@ -78,6 +79,7 @@ else: self.Entries[(index, subindex)] = new_entry_infos + entries_list_xslt = etree.parse( os.path.join(ScriptDirectory, "entries_list.xslt")) @@ -383,6 +385,7 @@ return extra_params + USERDATA_DIR = wx.StandardPaths.Get().GetUserDataDir() if wx.Platform != '__WXMSW__': USERDATA_DIR += '_files' diff -r 24db1e592e20 -r e40f3914e55f etherlab/runtime_etherlab.py --- a/etherlab/runtime_etherlab.py Fri Sep 28 19:25:18 2018 +0300 +++ b/etherlab/runtime_etherlab.py Fri Sep 28 19:30:16 2018 +0300 @@ -66,6 +66,7 @@ global Result return Result + KMSGPollThread = None StopKMSGThread = False