diff -r 6f5cd8d5dc11 -r 13c5cac55ac7 svghmi/widgets_common.ysl2 --- a/svghmi/widgets_common.ysl2 Sun Jan 16 16:59:40 2022 +0100 +++ b/svghmi/widgets_common.ysl2 Tue Jan 18 10:55:14 2022 +0100 @@ -83,7 +83,14 @@ if "position()!=last()" > , } - | "«@id»": new «$widget/@type»Widget ("«@id»",[«$args»],[«$indexes»],[«$minmaxes»],{ + const "freq" choose { + when "$widget/freq" + > «$widget/freq» + otherwise + > undefined + } + + | "«@id»": new «$widget/@type»Widget ("«@id»",«$freq»,[«$args»],[«$indexes»],[«$minmaxes»],{ apply "$widget", mode="widget_defs" with "hmi_element","."; | })`if "position()!=last()" > ,` } @@ -164,9 +171,10 @@ unsubscribable = false; pending_animate = false; - constructor(elt_id,args,indexes,minmaxes,members){ + constructor(elt_id, freq, args, indexes, minmaxes, members){ this.element_id = elt_id; this.element = id(elt_id); + if(freq !== undefined) this.frequency = freq; this.args = args; this.indexes = indexes; this.minmaxes = minmaxes;