# HG changeset patch # User Edouard Tisserant # Date 1572336610 -3600 # Node ID b9c5402532639cf0e98a39af18dc613756b16247 # Parent dc78ffa5253d90bc12da09433eeaf20aa0faaddd SVGHMI : fancier second page in tests/svghmi diff -r dc78ffa5253d -r b9c540253263 svghmi/svghmi.c --- a/svghmi/svghmi.c Mon Oct 28 19:52:43 2019 +0100 +++ b/svghmi/svghmi.c Tue Oct 29 09:10:10 2019 +0100 @@ -175,6 +175,7 @@ while(AtomicCompareExchange(&dsc->wlock, 0, 1)) sched_yield(); dsc->refresh_period_ms = refresh_period_ms; if(refresh_period_ms) { + /* TODO : maybe only if was null before for optimization */ dsc->wstate = buf_new; } else { dsc->wstate = buf_free; diff -r dc78ffa5253d -r b9c540253263 tests/svghmi/svghmi_0@svghmi/svghmi.svg --- a/tests/svghmi/svghmi_0@svghmi/svghmi.svg Mon Oct 28 19:52:43 2019 +0100 +++ b/tests/svghmi/svghmi_0@svghmi/svghmi.svg Tue Oct 29 09:10:10 2019 +0100 @@ -31,6 +31,33 @@ </metadata> <defs id="defs2"> + <linearGradient + inkscape:collect="always" + id="linearGradient962"> + <stop + style="stop-color:#ff3000;stop-opacity:1;" + offset="0" + id="stop958" /> + <stop + style="stop-color:#0022ff;stop-opacity:1" + offset="1" + id="stop960" /> + </linearGradient> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker926" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow2Lend"> + <path + transform="matrix(-1.1,0,0,-1.1,-1.1,0)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + style="fill:#ff3000;fill-opacity:1;fill-rule:evenodd;stroke:#ff3000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + id="path924" + inkscape:connector-curvature="0" /> + </marker> <inkscape:tag id="Set 3" inkscape:expanded="true" @@ -67,6 +94,16 @@ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" transform="matrix(-1.1,0,0,-1.1,-1.1,0)" /> </marker> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient962" + id="linearGradient964" + x1="113.38908" + y1="-62.210247" + x2="113.38908" + y2="4.0725975" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.5,0,0,0.5,73.144796,-1.4471993)" /> </defs> <sodipodi:namedview id="base" @@ -76,18 +113,18 @@ inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:document-units="px" - inkscape:current-layer="hmi0" + inkscape:current-layer="g110" showgrid="false" units="px" - inkscape:zoom="0.84375" - inkscape:cx="197.3711" - inkscape:cy="361.63812" + inkscape:zoom="0.8046875" + inkscape:cx="283.03663" + inkscape:cy="-454.38089" inkscape:window-width="1600" inkscape:window-height="886" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" - showguides="false" + showguides="true" inkscape:guide-bbox="true" /> <rect sodipodi:insensitive="true" @@ -97,23 +134,20 @@ height="720" width="1280" id="rect1016" - style="color:#000000;fill:#4d4d4d" /> + style="color:#000000;fill:#000000" /> <g id="g1082" inkscape:label="HMI:Jump:Home" - transform="translate(0,2)"> + transform="translate(-940,-558)"> <g id="g1152" inkscape:label="button"> - <rect - ry="35.579063" - y="1374.8225" - x="971.96545" - height="95.723877" - width="245.44583" + <path + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#ff6600;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="m 1217.4113,1410.4016 -22,24.5657 c -10.7925,12.0511 6.1317,35.5791 -13.5791,35.5791 h -174.2877 c -19.71078,0 -2.7866,-23.528 -13.57905,-35.5791 l -22,-24.5657 127.74845,-48.4334 z" id="rect1022" - style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#ff6600;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" - rx="35.579063" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cssssccc" /> </g> <g id="g1149" @@ -600,4 +634,267 @@ id="tspan1028-1" sodipodi:role="line">Home</tspan></text> </g> + <g + inkscape:label="HMI:Meter@/PUMP/SLOTH" + transform="matrix(7.5590552,0,0,7.5590552,-244.3956,1321.2434)" + id="g110"> + <path + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="M 113.38908,2.2017068 V -62.210247" + id="path90" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" + inkscape:label="range" /> + <path + inkscape:label="needle" + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path92" + d="M 113.38908,4.0725977 V -62.210247" + style="fill:none;fill-rule:evenodd;stroke:url(#linearGradient964);stroke-width:13.22916698;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:29.63333321;stroke-opacity:1" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:5.29166651px;line-height:125%;font-family:sans-serif;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#ff6600;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="115.07632" + y="9.3424692" + id="text96" + inkscape:label="min"><tspan + sodipodi:role="line" + id="tspan94" + x="115.07632" + y="9.3424692" + style="text-align:end;text-anchor:end;fill:#ff6600;stroke-width:0.26458332px">0</tspan></text> + <text + id="text100" + y="-64.195457" + x="113.27539" + style="font-style:normal;font-weight:normal;font-size:5.29166651px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ff6600;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve" + inkscape:label="max"><tspan + style="text-align:center;text-anchor:middle;fill:#ff6600;stroke-width:0.26458332px" + y="-64.195457" + x="113.27539" + id="tspan98" + sodipodi:role="line">10000</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ff6600;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="134.69675" + y="-16.777117" + id="text104" + inkscape:label="value"><tspan + sodipodi:role="line" + x="134.69675" + y="-16.777117" + style="text-align:center;text-anchor:middle;fill:#ff6600;stroke-width:0.26458332px" + id="tspan102">000</tspan></text> + <text + inkscape:label="unit" + id="text108" + y="-9.4425077" + x="140.65398" + style="font-style:normal;font-weight:normal;font-size:7.5467205px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ff6600;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + id="tspan106" + style="text-align:center;text-anchor:middle;fill:#ff6600;stroke-width:0.26458332px" + y="-9.4425077" + x="140.65398" + sodipodi:role="line">€£$Â¥</tspan></text> + </g> + <g + inkscape:label="HMI:Input@/TARGETPRESSURE" + id="g991" + transform="translate(-60,900)"> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:160px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="136.32812" + y="218.24219" + id="text977" + inkscape:label="value"><tspan + sodipodi:role="line" + id="tspan975" + x="136.32812" + y="218.24219" + style="stroke-width:1px">8888</tspan></text> + <rect + inkscape:label="edit" + onclick="" + y="95.40741" + x="139.85185" + height="128" + width="407.7037" + id="rect983" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> + <g + id="g1086" + inkscape:label="=0" + transform="translate(-416.52022,170.47452)"> + <path + inkscape:connector-curvature="0" + id="path989" + d="m 797.19546,145.18619 -80.62929,0.60214 -0.60215,-80.629288 80.6293,-0.60214 z" + inkscape:transform-center-y="-14.956361" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> + <text + id="text1048" + y="111.05016" + x="733.58197" + style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="stroke-width:0.5px" + y="111.05016" + x="733.58197" + id="tspan1046" + sodipodi:role="line">→0â†</tspan></text> + </g> + <g + id="g1091" + inkscape:label="-10" + transform="translate(-416.52022,170.47452)"> + <path + inkscape:transform-center-x="14.956371" + inkscape:transform-center-y="-3.6154501e-05" + d="m 622.6459,-170.03172 -51.81035,0 25.90517,-44.86908 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="1.5707963" + sodipodi:arg1="0.52359878" + sodipodi:r2="14.956361" + sodipodi:r1="29.912722" + sodipodi:cy="-184.98808" + sodipodi:cx="596.74072" + sodipodi:sides="3" + id="path981" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + sodipodi:type="star" + transform="matrix(0,-2.0000001,1.9999999,0,1034.195,1298.6541)" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="633.09552" + y="111.05016" + id="text1059"><tspan + sodipodi:role="line" + id="tspan1057" + x="633.09552" + y="111.05016" + style="stroke-width:0.5px">-10</tspan></text> + </g> + <g + id="g1096" + inkscape:label="-100" + transform="translate(-416.52022,170.47452)"> + <path + inkscape:transform-center-x="14.956364" + transform="rotate(-90,746.45698,-44.543641)" + sodipodi:type="star" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + id="path979" + sodipodi:sides="3" + sodipodi:cx="596.74072" + sodipodi:cy="-216.2599" + sodipodi:r1="59.825443" + sodipodi:r2="29.912722" + sodipodi:arg1="0.52359878" + sodipodi:arg2="1.5707963" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="m 648.55108,-186.34718 -103.62071,0 51.81035,-89.73817 z" + inkscape:transform-center-y="-5.9989963e-06" /> + <text + id="text1063" + y="111.05016" + x="537.25018" + style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="stroke-width:0.5px" + y="111.05016" + x="537.25018" + id="tspan1061" + sodipodi:role="line">-100</tspan></text> + </g> + <g + id="g1076" + inkscape:label="+100" + transform="translate(-416.52022,170.47452)"> + <path + inkscape:transform-center-x="-14.956365" + transform="matrix(0,-1,-1,0,1043.9134,701.91334)" + inkscape:transform-center-y="-5.5023185e-06" + d="m 648.55108,135.08534 -103.62071,0 51.81035,-89.738161 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="1.5707963" + sodipodi:arg1="0.52359878" + sodipodi:r2="29.912722" + sodipodi:r1="59.825443" + sodipodi:cy="105.17262" + sodipodi:cx="596.74072" + sodipodi:sides="3" + id="path985" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + sodipodi:type="star" /> + <text + id="text1067" + y="111.05016" + x="925.82605" + style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="stroke-width:0.5px" + y="111.05016" + x="925.82605" + id="tspan1065" + sodipodi:role="line">+100</tspan></text> + </g> + <g + id="g1081" + inkscape:label="+10" + transform="translate(-416.52022,170.47452)"> + <path + inkscape:transform-center-x="-14.956349" + transform="matrix(0,-2.0000001,-1.9999999,0,1122.1514,1298.6541)" + sodipodi:type="star" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + id="path987" + sodipodi:sides="3" + sodipodi:cx="596.74072" + sodipodi:cy="136.44444" + sodipodi:r1="29.912722" + sodipodi:r2="14.956361" + sodipodi:arg1="0.52359878" + sodipodi:arg2="1.5707963" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="m 622.6459,151.4008 -51.81035,0 25.90517,-44.86908 z" + inkscape:transform-center-y="-3.3040441e-05" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="842.71497" + y="111.05016" + id="text1071"><tspan + sodipodi:role="line" + id="tspan1069" + x="842.71497" + y="111.05016" + style="stroke-width:0.5px">+10</tspan></text> + </g> + </g> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:160px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#82ff77;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" + x="736.32812" + y="1478.2422" + id="text995" + inkscape:label="HMI:Display@/PUMP/PRESSURE"><tspan + sodipodi:role="line" + id="tspan993" + x="736.32812" + y="1478.2422" + style="fill:#82ff77;fill-opacity:1;stroke-width:1px;">8888</tspan></text> </svg>