--- a/svghmi/parse_labels.ysl2 Fri May 06 11:02:03 2022 +0200
+++ b/svghmi/parse_labels.ysl2 Fri May 06 11:04:17 2022 +0200
@@ -15,7 +15,7 @@
const "pathregex",!"'^([^\[,]+)(\[[^\]]+\])?([\d,]*)$'"!;
-template "*", mode="parselabel"
+template "*", mode="parselabel" const "label","@inkscape:label";
@@ -45,7 +45,7 @@
- if "not(regexp:test($freq,'^[0-9]*(\.[0-9]+)?[smh]'))" {
+ if "not(regexp:test($freq,'^[0-9]*(\.[0-9]+)?[smh]?'))" { error > Widget id:«$id» label:«$label» has wrong syntax of frequency forcing «$freq»
--- a/svghmi/widgets_common.ysl2 Fri May 06 11:02:03 2022 +0200
+++ b/svghmi/widgets_common.ysl2 Fri May 06 11:04:17 2022 +0200
@@ -187,23 +187,23 @@
- if(widget.forced_frequency !== undefined){
- let s = widget.forced_frequency;
+ let forced = this.forced_frequency; + if(forced !== undefined){ once every 10 seconds : 10s
- let unit = s.slice(-1);
+ let unit = forced.slice(-1); - widget.frequency = factor ? 1/(factor * Number(s.slice(0,-1)))
+ this.frequency = factor ? 1/(factor * Number(forced.slice(0,-1)))