equal
deleted
inserted
replaced
237 tobinary(value)]); |
237 tobinary(value)]); |
238 |
238 |
239 cache[index] = value; |
239 cache[index] = value; |
240 }; |
240 }; |
241 |
241 |
|
242 function apply_hmi_value(index, new_val) { |
|
243 let old_val = cache[index] |
|
244 if(new_val != undefined && old_val != new_val) |
|
245 send_hmi_value(index, new_val); |
|
246 return new_val; |
|
247 } |
|
248 |
242 function change_hmi_value(index, opstr) { |
249 function change_hmi_value(index, opstr) { |
243 let op = opstr[0]; |
250 let op = opstr[0]; |
244 let given_val = opstr.slice(1); |
251 let given_val = opstr.slice(1); |
245 let old_val = cache[index] |
252 let old_val = cache[index] |
246 let new_val; |
253 let new_val; |
458 // TODO : re-enable auto reload when not in debug |
465 // TODO : re-enable auto reload when not in debug |
459 //window.setTimeout(() => location.reload(true), 10000); |
466 //window.setTimeout(() => location.reload(true), 10000); |
460 alert("Connection closed. code:"+evt.code+" reason:"+evt.reason+" wasClean:"+evt.wasClean+"."); |
467 alert("Connection closed. code:"+evt.code+" reason:"+evt.reason+" wasClean:"+evt.wasClean+"."); |
461 |
468 |
462 }; |
469 }; |
|
470 |
|
471 var edit_callback; |
|
472 function edit_value(path, valuetype, callback, initial) { |
|
473 |
|
474 keypad = keypads[valuetype]; |
|
475 console.log('XXX TODO : Edit value', path, valuetype, callback, initial, keypad); |
|
476 edit_callback = callback; |
|
477 |
|
478 }; |
|
479 |