equal
deleted
inserted
replaced
81 > undefined |
81 > undefined |
82 } |
82 } |
83 if "position()!=last()" > , |
83 if "position()!=last()" > , |
84 } |
84 } |
85 |
85 |
86 | "«@id»": new «$widget/@type»Widget ("«@id»",[«$args»],[«$indexes»],[«$minmaxes»],{ |
86 const "freq" choose { |
|
87 when "$widget/@freq" |
|
88 > «$widget/@freq» |
|
89 otherwise |
|
90 > undefined |
|
91 } |
|
92 |
|
93 | "«@id»": new «$widget/@type»Widget ("«@id»",«$freq»,[«$args»],[«$indexes»],[«$minmaxes»],{ |
87 apply "$widget", mode="widget_defs" with "hmi_element","."; |
94 apply "$widget", mode="widget_defs" with "hmi_element","."; |
88 | })`if "position()!=last()" > ,` |
95 | })`if "position()!=last()" > ,` |
89 } |
96 } |
90 |
97 |
91 emit "preamble:local-variable-indexes" { |
98 emit "preamble:local-variable-indexes" { |
162 offset = 0; |
169 offset = 0; |
163 frequency = 10; /* FIXME arbitrary default max freq. Obtain from config ? */ |
170 frequency = 10; /* FIXME arbitrary default max freq. Obtain from config ? */ |
164 unsubscribable = false; |
171 unsubscribable = false; |
165 pending_animate = false; |
172 pending_animate = false; |
166 |
173 |
167 constructor(elt_id,args,indexes,minmaxes,members){ |
174 constructor(elt_id, freq, args, indexes, minmaxes, members){ |
168 this.element_id = elt_id; |
175 this.element_id = elt_id; |
169 this.element = id(elt_id); |
176 this.element = id(elt_id); |
|
177 if(freq !== undefined) this.frequency = freq; |
170 this.args = args; |
178 this.args = args; |
171 this.indexes = indexes; |
179 this.indexes = indexes; |
172 this.minmaxes = minmaxes; |
180 this.minmaxes = minmaxes; |
173 Object.keys(members).forEach(prop => this[prop]=members[prop]); |
181 Object.keys(members).forEach(prop => this[prop]=members[prop]); |
174 this.lastapply = indexes.map(() => undefined); |
182 this.lastapply = indexes.map(() => undefined); |