Merge changes from default in wxPython4
--- a/ProjectController.py Wed Aug 10 16:44:58 2022 +0200
+++ b/ProjectController.py Thu Aug 11 17:39:12 2022 +0200
@@ -1578,12 +1578,16 @@
return debug_status, ticks, buffers
RegisterDebugVariableErrorCodes = {
+ # Connector only can return None + None : _("Debug: connection problem.\n"), 1 : _("Debug: Too many variables traced. Max 1024.\n"),
2 : _("Debug: Too many variables forced. Max 256.\n"),
- 3 : _("Debug: Cumulated forced variables size too large. Max 1KB.\n")
+ 3 : _("Debug: Cumulated forced variables size too large. Max 1KB.\n"), + 4 : _("Debug: suspended.\n") def RegisterDebugVarToConnector(self):
@@ -1626,7 +1630,8 @@
self.logger.write_warning(
self.RegisterDebugVariableErrorCodes.get(
- -res, _("Debug: Unknown error")))
+ -res if res is not None else None, + _("Debug: Unknown error"))) self._connector.SetTraceVariablesList([])
--- a/runtime/PLCObject.py Wed Aug 10 16:44:58 2022 +0200
+++ b/runtime/PLCObject.py Thu Aug 11 17:39:12 2022 +0200
@@ -466,7 +466,7 @@
self.PythonThreadAcknowledge(cmd)
self.PythonRuntimeCall("start")
self.LogMessage("Python extensions started")
self.PythonRuntimeCall("stop", reverse_order=True)
@@ -504,6 +504,13 @@
+ def _PostStartPLC(self): + self.LogMessage(0, 'Post Start Exception'+'\n'.join( + traceback.format_exception(*sys.exc_info()))) Here goes actions to be taken after PLC is started,
@@ -730,7 +737,7 @@
+ return 4 # DEBUG_SUSPENDED self.LastSwapTrace = time()
--- a/svghmi/hmi_tree.ysl2 Wed Aug 10 16:44:58 2022 +0200
+++ b/svghmi/hmi_tree.ysl2 Thu Aug 11 17:39:12 2022 +0200
@@ -121,6 +121,7 @@
> «$indent» «local-name()»
foreach "@*" > «local-name()»="«.»"
+ if "text()" > «text()»\n apply "*", mode="testtree" {
with "indent" value "concat($indent,'>')"
--- a/svghmi/parse_labels.ysl2 Wed Aug 10 16:44:58 2022 +0200
+++ b/svghmi/parse_labels.ysl2 Thu Aug 11 17:39:12 2022 +0200
@@ -15,9 +15,29 @@
const "pathregex",!"'^([^\[,]+)(\[[^\]]+\])?([-.\d,]*)$'"!;
+const "twonewlines", "concat($newline,$newline)"; template "*", mode="parselabel"
- const "label","@inkscape:label";
+ const "part","@inkscape:label"; + const "desc", "svg:desc"; + // add svg:desc field if continuation "\" marker is found at the end of label + const "len","string-length($part)"; + const "has_continuation", "substring($part,$len,1)='\\'"; + when "$has_continuation" { + const "_continuation", "substring-before($desc, $twonewlines)"; + const "continuation" choose { + when "$_continuation" value "$_continuation"; + otherwise value "$desc"; + value "concat(substring($part,1,$len - 1),translate($continuation,$newline,''))"; + otherwise value "$part"; const "description", "substring-after($label,'HMI:')";
@@ -100,7 +120,15 @@
- if "svg:desc" desc value "svg:desc/text()";
+ when "$has_continuation" { + const "_continuation", "substring-after($desc, $twonewlines)"; + desc value "$_continuation"; + if "$desc" desc value "$desc/text()"; --- a/svghmi/widget_jump.ysl2 Wed Aug 10 16:44:58 2022 +0200
+++ b/svghmi/widget_jump.ysl2 Thu Aug 11 17:39:12 2022 +0200
@@ -84,6 +84,9 @@
this.disabled = !Number(value);
+ // TODO : use RequestAnimate and animate() @@ -142,6 +145,7 @@
+/* TODO: move to detachable pages ysl2 */ --- a/svghmi/widget_multistate.ysl2 Wed Aug 10 16:44:58 2022 +0200
+++ b/svghmi/widget_multistate.ysl2 Thu Aug 11 17:39:12 2022 +0200
@@ -36,6 +36,7 @@
choice.elt.setAttribute("style", choice.style);
+ // TODO : use RequestAnimate and animate() --- a/targets/plc_debug.c Wed Aug 10 16:44:58 2022 +0200
+++ b/targets/plc_debug.c Thu Aug 11 17:39:12 2022 +0200
@@ -140,7 +140,7 @@
/* Iterate over all variables to fill debug buffer */
- static unsigned int retain_offset = 0;
+ unsigned int retain_offset = 0; retain_list_collect_cursor = 0;
/* iterate over retain list */
@@ -322,7 +322,7 @@
- static unsigned int retain_offset = 0;
+ unsigned int retain_offset = 0; /* when not debugging, do only retain */
retain_list_collect_cursor = 0;
--- a/tests/projects/svghmi/plc.xml Wed Aug 10 16:44:58 2022 +0200
+++ b/tests/projects/svghmi/plc.xml Thu Aug 11 17:39:12 2022 +0200
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2019-08-06T14:23:42"/>
- <contentHeader name="Unnamed" modificationDateTime="2022-01-18T11:38:21">
+ <contentHeader name="Unnamed" modificationDateTime="2022-07-21T11:39:43"> @@ -25,11 +25,20 @@
<derived name="HMI_INT"/>
+ <localVars retain="true"> <variable name="selection">
<derived name="HMI_INT"/>
+ <variable name="selection0"> <derived name="PumpControl"/>
--- a/tests/projects/svghmi_scrollbar/svghmi_0@svghmi/svghmi.svg Wed Aug 10 16:44:58 2022 +0200
+++ b/tests/projects/svghmi_scrollbar/svghmi_0@svghmi/svghmi.svg Thu Aug 11 17:39:12 2022 +0200
@@ -60,12 +60,12 @@
- inkscape:cx="-438.80601"
- inkscape:cy="183.59799"
- inkscape:window-width="3200"
- inkscape:window-height="1672"
+ inkscape:cx="476.03774" + inkscape:cy="444.53549" + inkscape:window-width="1600" + inkscape:window-height="836"
inkscape:window-maximized="1"
inkscape:guide-bbox="true"
@@ -745,8 +745,14 @@
- inkscape:label="HMI:ScrollBar@.range@.position@.size"
+ inkscape:label="HMI:ScrollBar\" transform="translate(-202)">
+my tailor is rich</desc> @@ -857,6 +863,9 @@
inkscape:label="HMI:ScrollBar@.range@.position@.size"
+ id="desc149">deedewesfsdf style="opacity:1;vector-effect:none;fill:#ff35ff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"