--- a/PLCControler.py Wed Aug 16 13:01:13 2017 +0300
+++ b/PLCControler.py Wed Aug 16 13:49:02 2017 +0300
@@ -3127,17 +3127,17 @@
new_task.setname(task["Name"])
if task["Triggering"] == "Interrupt":
new_task.setsingle(task["Single"])
-## result = duration_model.match(task["Interval"]).groups()
-## if reduce(lambda x, y: x or y != None, result):
-## for value in result[:-1]:
-## values.append(int(value))
-## if result[-1] is not None:
-## values.append(int(float(result[-1]) * 1000))
-## new_task.setinterval(datetime.time(*values))
+# result = duration_model.match(task["Interval"]).groups() +# if reduce(lambda x, y: x or y != None, result): +# for value in result[:-1]: +# values.append(int(value)) +# if result[-1] is not None: +# values.append(int(float(result[-1]) * 1000)) +# new_task.setinterval(datetime.time(*values)) if task["Triggering"] == "Cyclic":
new_task.setinterval(task["Interval"])
new_task.setpriority(int(task["Priority"]))
@@ -3171,19 +3171,19 @@
interval = task.getinterval()
-## if interval.hour != 0:
-## text += "%dh"%interval.hour
-## if interval.minute != 0:
-## text += "%dm"%interval.minute
-## if interval.second != 0:
-## text += "%ds"%interval.second
-## if interval.microsecond != 0:
-## if interval.microsecond % 1000 != 0:
-## text += "%.3fms"%(float(interval.microsecond) / 1000)
-## text += "%dms"%(interval.microsecond / 1000)
-## new_task["Interval"] = text
+# if interval.hour != 0: +# text += "%dh"%interval.hour +# if interval.minute != 0: +# text += "%dm"%interval.minute +# if interval.second != 0: +# text += "%ds"%interval.second +# if interval.microsecond != 0: +# if interval.microsecond % 1000 != 0: +# text += "%.3fms"%(float(interval.microsecond) / 1000) +# text += "%dms"%(interval.microsecond / 1000) +# new_task["Interval"] = text new_task["Interval"] = interval
new_task["Interval"] = ""
--- a/PLCGenerator.py Wed Aug 16 13:01:13 2017 +0300
+++ b/PLCGenerator.py Wed Aug 16 13:49:02 2017 +0300
@@ -414,16 +414,16 @@
resrce += [("INTERVAL := ", ()),
(interval, (tagname, "task", task_number, "interval")),
-## resrce += [("INTERVAL := t#", ())]
-## if interval.hour != 0:
-## resrce += [("%dh"%interval.hour, (tagname, "task", task_number, "interval", "hour"))]
-## if interval.minute != 0:
-## resrce += [("%dm"%interval.minute, (tagname, "task", task_number, "interval", "minute"))]
-## if interval.second != 0:
-## resrce += [("%ds"%interval.second, (tagname, "task", task_number, "interval", "second"))]
-## if interval.microsecond != 0:
-## resrce += [("%dms"%(interval.microsecond / 1000), (tagname, "task", task_number, "interval", "millisecond"))]
-## resrce += [(",", ())]
+# resrce += [("INTERVAL := t#", ())] +# if interval.hour != 0: +# resrce += [("%dh"%interval.hour, (tagname, "task", task_number, "interval", "hour"))] +# if interval.minute != 0: +# resrce += [("%dm"%interval.minute, (tagname, "task", task_number, "interval", "minute"))] +# if interval.second != 0: +# resrce += [("%ds"%interval.second, (tagname, "task", task_number, "interval", "second"))] +# if interval.microsecond != 0: +# resrce += [("%dms"%(interval.microsecond / 1000), (tagname, "task", task_number, "interval", "millisecond"))] resrce += [("PRIORITY := ", ()),
("%d" % task.getpriority(), (tagname, "task", task_number, "priority")),
--- a/connectors/WAMP/__init__.py Wed Aug 16 13:01:13 2017 +0300
+++ b/connectors/WAMP/__init__.py Wed Aug 16 13:49:02 2017 +0300
@@ -74,7 +74,7 @@
def RegisterWampClient():
- ## start logging to console
+ # start logging to console # log.startLogging(sys.stdout)
# create a WAMP application session factory
--- a/editors/DataTypeEditor.py Wed Aug 16 13:01:13 2017 +0300
+++ b/editors/DataTypeEditor.py Wed Aug 16 13:49:02 2017 +0300
@@ -592,17 +592,17 @@
message = _("\"%s\" is not a valid identifier!") % value
elif value.upper() in IEC_KEYWORDS:
message = _("\"%s\" is a keyword. It can't be used!") % value
-## elif value.upper() in self.PouNames:
-## message = _("A pou with \"%s\" as name exists!")%value
+# elif value.upper() in self.PouNames: +# message = _("A pou with \"%s\" as name exists!")%value elif value.upper() in [var["Name"].upper() for idx, var in enumerate(self.StructureElementsTable.GetData()) if idx != row]:
message = _("An element named \"%s\" already exists in this structure!") % value
wx.CallAfter(self.StructureElementsTable.ResetView, self.StructureElementsGrid)
-## old_value = self.Table.GetOldValue()
-## self.Controler.UpdateEditedElementUsedVariable(self.TagName, old_value, value)
-## self.Controler.BufferProject()
+# old_value = self.Table.GetOldValue() +# self.Controler.UpdateEditedElementUsedVariable(self.TagName, old_value, value) +# self.Controler.BufferProject() @@ -640,15 +640,15 @@
AppendMenu(type_menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=_("Array"))
self.Bind(wx.EVT_MENU, self.ElementArrayTypeFunction, id=new_id)
-## functionblock_menu = wx.Menu(title='')
-## bodytype = self.Controler.GetEditedElementBodyType(self.TagName)
-## pouname, poutype = self.Controler.GetEditedElementType(self.TagName)
-## if classtype in ["Input","Output","InOut","External","Global"] or poutype != "function" and bodytype in ["ST", "IL"]:
-## for functionblock_type in self.Controler.GetFunctionBlockTypes(self.TagName):
-## AppendMenu(functionblock_menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=functionblock_type)
-## self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(functionblock_type), id=new_id)
-## type_menu.AppendMenu(wx.NewId(), _("Function Block Types"), functionblock_menu)
+# functionblock_menu = wx.Menu(title='') +# bodytype = self.Controler.GetEditedElementBodyType(self.TagName) +# pouname, poutype = self.Controler.GetEditedElementType(self.TagName) +# if classtype in ["Input","Output","InOut","External","Global"] or poutype != "function" and bodytype in ["ST", "IL"]: +# for functionblock_type in self.Controler.GetFunctionBlockTypes(self.TagName): +# AppendMenu(functionblock_menu, help='', id=new_id, kind=wx.ITEM_NORMAL, text=functionblock_type) +# self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(functionblock_type), id=new_id) +# type_menu.AppendMenu(wx.NewId(), _("Function Block Types"), functionblock_menu) rect = self.StructureElementsGrid.BlockToDeviceRect((row, col), (row, col))
self.StructureElementsGrid.PopupMenuXY(type_menu, rect.x + rect.width, rect.y + self.StructureElementsGrid.GetColLabelSize())
--- a/editors/LDViewer.py Wed Aug 16 13:01:13 2017 +0300
+++ b/editors/LDViewer.py Wed Aug 16 13:49:02 2017 +0300
@@ -70,9 +70,9 @@
for child in values["children"]:
-## if child in elements:
-## RemoveElement(child, element_tree)
-## removed.append(child)
+# RemoveElement(child, element_tree) if "start" in element_tree[child]["parents"]:
if element not in remove_stops["stop"]:
remove_stops["stop"].append(element)
@@ -100,7 +100,7 @@
RemoveElement(child, element_tree)
-## element_tree[remove] = None
+# element_tree[remove] = None def GenerateTree(element, element_tree, stop_list):
@@ -118,12 +118,12 @@
for wire, handle in connector.GetWires():
next = wire.EndConnected.GetParentBlock()
if isinstance(next, LD_PowerRail) and next.GetType() == LEFTRAIL or next in stop_list:
-## for remove in element_tree[element]["children"]:
-## RemoveElement(remove, element_tree)
-## element_tree[element]["children"] = ["stop"]
+# for remove in element_tree[element]["children"]: +# RemoveElement(remove, element_tree) +# element_tree[element]["children"] = ["stop"] element_tree[element]["children"].append("stop")
-## elif element_tree[element]["children"] == ["stop"]:
-## element_tree[next] = None
+# elif element_tree[element]["children"] == ["stop"]: +# element_tree[next] = None elif next not in element_tree or element_tree[next]:
element_tree[element]["children"].append(next)
--- a/graphics/FBD_Objects.py Wed Aug 16 13:01:13 2017 +0300
+++ b/graphics/FBD_Objects.py Wed Aug 16 13:49:02 2017 +0300
@@ -380,17 +380,17 @@
-## # Method called when a Motion event have been generated
-## def OnMotion(self, event, dc, scaling):
-## if not event.Dragging():
-## pos = event.GetLogicalPosition(dc)
-## for input in self.Inputs:
-## rect = input.GetRedrawRect()
-## if rect.InsideXY(pos.x, pos.y):
-## tip = wx.TipWindow(self.Parent, "Test")
-## tip.SetBoundingRect(rect)
-## return Graphic_Element.OnMotion(self, event, dc, scaling)
+# # Method called when a Motion event have been generated +# def OnMotion(self, event, dc, scaling): +# if not event.Dragging(): +# pos = event.GetLogicalPosition(dc) +# for input in self.Inputs: +# rect = input.GetRedrawRect() +# if rect.InsideXY(pos.x, pos.y): +# tip = wx.TipWindow(self.Parent, "Test") +# tip.SetBoundingRect(rect) +# return Graphic_Element.OnMotion(self, event, dc, scaling) # Method called when a LeftDClick event have been generated
def OnLeftDClick(self, event, dc, scaling):
--- a/runtime/WampClient.py Wed Aug 16 13:01:13 2017 +0300
+++ b/runtime/WampClient.py Wed Aug 16 13:49:02 2017 +0300
@@ -104,7 +104,7 @@
WSClientConf = LoadWampClientConf(wampconf)
- ## start logging to console
+ # start logging to console # log.startLogging(sys.stdout)
# create a WAMP application session factory
--- a/svgui/pyjs/build.py Wed Aug 16 13:01:13 2017 +0300
+++ b/svgui/pyjs/build.py Wed Aug 16 13:49:02 2017 +0300
@@ -187,14 +187,14 @@
print >>sys.stderr, "Exception creating output directory %s: %s" % (output, e)
pub_dir = join(p, 'public')
print "Copying: public directory of library %r" % p
copytree_exists(pub_dir, output)
- ## AppName.html - can be in current or public directory
+ # AppName.html - can be in current or public directory html_input_filename = app_name + ".html"
html_output_filename = join(output, basename(html_input_filename))
if os.path.isfile(html_input_filename):
@@ -211,7 +211,7 @@
if check_html_file(html_input_filename, output):
print >>sys.stderr, "Warning: Module HTML file %s has been auto-generated" % html_input_filename
print "Copying: pygwt.js"
@@ -222,7 +222,7 @@
print "Copying: Images and History"
copy_boilerplate(data_dir, "corner_dialog_topleft_black.png", output)
@@ -240,11 +240,11 @@
copy_boilerplate(data_dir, "tree_white.gif", output)
copy_boilerplate(data_dir, "history.html", output)
app_files = generateAppFiles(data_dir, js_includes, app_name, debug,
output, dynamic, cache_buster, optimize)
- ## AppName.nocache.html
print "Creating: %(app_name)s.nocache.html" % locals()
--- a/targets/toolchain_gcc.py Wed Aug 16 13:01:13 2017 +0300
+++ b/targets/toolchain_gcc.py Wed Aug 16 13:49:02 2017 +0300
@@ -158,7 +158,7 @@
Builder_CFLAGS = ' '.join(self.getBuilderCFLAGS())
- ######### GENERATE OBJECT FILES ########################################
+ # ----------------- GENERATE OBJECT FILES ------------------------ relink = self.GetBinaryCode() is None
@@ -200,7 +200,7 @@
obns.append(os.path.basename(CFile))
- ######### GENERATE OUTPUT FILE ########################################
+ # ---------------- GENERATE OUTPUT FILE -------------------------- # Link all the object files into one binary file
self.CTRInstance.logger.write(_("Linking :\n"))