svghmi/svghmi.js
branchsvghmi
changeset 2960 5ad82541b46e
parent 2951 506fe9272660
child 2970 4a9b0df0602a
equal deleted inserted replaced
2959:ae549ba1a116 2960:5ad82541b46e
   205 
   205 
   206         // subscribing with a zero period is unsubscribing
   206         // subscribing with a zero period is unsubscribing
   207         let new_period = 0;
   207         let new_period = 0;
   208         if(widgets.size > 0) {
   208         if(widgets.size > 0) {
   209             let maxfreq = 0;
   209             let maxfreq = 0;
   210             for(let widget of widgets)
   210             for(let widget of widgets){
   211                 if(maxfreq < widget.frequency)
   211                 let wf = widget.frequency;
   212                     maxfreq = widget.frequency;
   212                 if(wf != undefined && maxfreq < wf)
       
   213                     maxfreq = wf;
       
   214             }
   213 
   215 
   214             if(maxfreq != 0)
   216             if(maxfreq != 0)
   215                 new_period = 1000/maxfreq;
   217                 new_period = 1000/maxfreq;
   216         }
   218         }
   217 
   219