svghmi/svghmi.js
branchwxPython4
changeset 3422 700b39cb4525
parent 3413 2e84a2782295
child 3417 9b9775d230f5
equal deleted inserted replaced
3405:fdc12f7d27c8 3422:700b39cb4525
   330     // DON'T DO THAT unless read_iterator in svghmi.c modifies wbuf as well, not only rbuf
   330     // DON'T DO THAT unless read_iterator in svghmi.c modifies wbuf as well, not only rbuf
   331     // cache[index] = value;
   331     // cache[index] = value;
   332 };
   332 };
   333 
   333 
   334 function apply_hmi_value(index, new_val) {
   334 function apply_hmi_value(index, new_val) {
   335     let old_val = cache[index];
   335     // Similarly to previous comment, taking decision to update based 
   336     if(new_val != undefined && old_val != new_val)
   336     // on cache content is bad and can lead to inconsistency
       
   337     /*let old_val = cache[index];*/
       
   338     if(new_val != undefined /*&& old_val != new_val*/)
   337         send_hmi_value(index, new_val);
   339         send_hmi_value(index, new_val);
   338     return new_val;
   340     return new_val;
   339 }
   341 }
   340 
   342 
   341 const quotes = {"'":null, '"':null};
   343 const quotes = {"'":null, '"':null};