svghmi/svghmi.js
branchsvghmi
changeset 2806 7d0e81cdedb0
parent 2805 e521e0d133d5
child 2808 dc78ffa5253d
equal deleted inserted replaced
2805:e521e0d133d5 2806:7d0e81cdedb0
   132 
   132 
   133         if(previous_period != new_period) {
   133         if(previous_period != new_period) {
   134             subscriptions[index] = new_period;
   134             subscriptions[index] = new_period;
   135             delta.push(
   135             delta.push(
   136                 new Uint8Array([2]), /* subscribe = 2 */
   136                 new Uint8Array([2]), /* subscribe = 2 */
   137                 new Uint32Array([index]), 
   137                 new Uint32Array([index]),
   138                 new Uint16Array([new_period]));
   138                 new Uint16Array([new_period]));
   139         }
   139         }
   140         
       
   141     }
   140     }
   142     send_blob(delta);
   141     send_blob(delta);
   143 };
   142 };
   144 
   143 
   145 function send_hmi_value(index, value) {
   144 function send_hmi_value(index, value) {
   169         if(old_val != undefined)
   168         if(old_val != undefined)
   170             new_val = eval("old_val"+opstr);
   169             new_val = eval("old_val"+opstr);
   171         break;
   170         break;
   172     }
   171     }
   173     if(new_val != undefined && old_val != new_val)
   172     if(new_val != undefined && old_val != new_val)
   174         return send_hmi_value(index, new_val);
   173         send_hmi_value(index, new_val);
       
   174     return new_val;
   175 }
   175 }
   176 
   176 
   177 var current_page;
   177 var current_page;
   178 
   178 
   179 function switch_page(page_name) {
   179 function switch_page(page_name) {