# HG changeset patch # User Andrey Skvortsov <andrej.skvortzov@gmail.com> # Date 1533913658 -10800 # Node ID 70143c20d2c0281861c9a7548b143c26ea13e904 # Parent a3ac46366b86a0b237dac93be6b2281ac70b98a8# Parent 74205edac7614e1d121fd1b092d18abc10c1204d merge diff -r 74205edac761 -r 70143c20d2c0 PLCGenerator.py --- a/PLCGenerator.py Thu Aug 09 09:07:09 2018 +0200 +++ b/PLCGenerator.py Fri Aug 10 18:07:38 2018 +0300 @@ -926,6 +926,9 @@ if blk is None: return None + if not hasattr(blk, "inputVariables"): + return None + for invar in blk.inputVariables.getvariable(): if invar.getformalParameter() == "EN": if len(invar.getconnectionPointIn().getconnections()) > 0: @@ -1343,7 +1346,7 @@ else: paths.append(variable) elif isinstance(next, CoilClass): - paths.append(str(self.GeneratePaths(next.connectionPointIn.getconnections(), body, order))) + paths.append(self.GeneratePaths(next.connectionPointIn.getconnections(), body, order)) return paths def ComputePaths(self, paths, first=False): diff -r 74205edac761 -r 70143c20d2c0 README.md --- a/README.md Thu Aug 09 09:07:09 2018 +0200 +++ b/README.md Fri Aug 10 18:07:38 2018 +0300 @@ -45,11 +45,11 @@ * Build CanFestival (optional) Only needed for CANopen support. Please read CanFestival manual to choose CAN interface other than 'virtual'. - cd ~/Beremiz - hg clone http://dev.automforge.net/CanFestival-3 - cd ~/Beremiz/CanFestival-3 - ./configure --can=virtual - make + cd ~/Beremiz + hg clone http://dev.automforge.net/CanFestival-3 + cd ~/Beremiz/CanFestival-3 + ./configure --can=virtual + make * Build Modbus library (optional) Only needed for Modbus support. @@ -59,6 +59,14 @@ cd ~/Beremiz/Modbus make +* Build BACnet (optional) + Only needed for BACnet support. + + cd ~/Beremiz + svn checkout https://svn.code.sf.net/p/bacnet/code/trunk/bacnet-stack/ BACnet + cd BACnet + make MAKE_DEFINE='-fPIC' all + * Launch Beremiz IDE cd ~/Beremiz/beremiz diff -r 74205edac761 -r 70143c20d2c0 etherlab/__init__.py --- a/etherlab/__init__.py Thu Aug 09 09:07:09 2018 +0200 +++ b/etherlab/__init__.py Fri Aug 10 18:07:38 2018 +0300 @@ -1,1 +1,7 @@ -from etherlab import * \ No newline at end of file +from __future__ import absolute_import + +from etherlab.etherlab import * +from util.BitmapLibrary import AddBitmapFolder +import util.paths as paths + +AddBitmapFolder(os.path.join(paths.AbsDir(__file__), "images")) diff -r 74205edac761 -r 70143c20d2c0 xmlclass/xmlclass.py --- a/xmlclass/xmlclass.py Thu Aug 09 09:07:09 2018 +0200 +++ b/xmlclass/xmlclass.py Fri Aug 10 18:07:38 2018 +0300 @@ -1162,6 +1162,7 @@ classmembers["get%s" % elmtname] = generateGetMethod(elmtname) classmembers["_init_"] = generateInitMethod(self, classinfos) + classmembers["_tmp_initial_"] = None classmembers["StructurePattern"] = GetStructurePattern(classinfos) classmembers["getElementAttributes"] = generateGetElementAttributes(self, classinfos) classmembers["getElementInfos"] = generateGetElementInfos(self, classinfos) @@ -1581,6 +1582,10 @@ if element["type"] != CHOICE: initial = GetElementInitialValue(factory, element) if initial is not None: + # FIXME: this is looks like dirty hack to fix strange problem with initial[0] + # changing its type after returning from _init_ method to lxml.etree._Element + # As a result all methods generated by class factory are lost. + object.__setattr__(self, "_tmp_initial_", initial) map(self.append, initial) return initMethod