diff -r 1a1caf71b1cc -r 211d6a185e31 svghmi/svghmi.js --- a/svghmi/svghmi.js Thu Apr 02 09:38:53 2020 +0200 +++ b/svghmi/svghmi.js Thu Apr 02 14:03:38 2020 +0200 @@ -239,6 +239,13 @@ cache[index] = value; }; +function apply_hmi_value(index, new_val) { + let old_val = cache[index] + if(new_val != undefined && old_val != new_val) + send_hmi_value(index, new_val); + return new_val; +} + function change_hmi_value(index, opstr) { let op = opstr[0]; let given_val = opstr.slice(1); @@ -460,3 +467,13 @@ alert("Connection closed. code:"+evt.code+" reason:"+evt.reason+" wasClean:"+evt.wasClean+"."); }; + +var edit_callback; +function edit_value(path, valuetype, callback, initial) { + + keypad = keypads[valuetype]; + console.log('XXX TODO : Edit value', path, valuetype, callback, initial, keypad); + edit_callback = callback; + +}; +