svghmi/svghmi.js
branchsvghmi
changeset 3128 32a4675af377
parent 3126 f45e413a0f40
child 3129 f2709923c82c
--- a/svghmi/svghmi.js	Tue Feb 09 07:41:24 2021 +0100
+++ b/svghmi/svghmi.js	Tue Feb 09 07:46:02 2021 +0100
@@ -243,6 +243,13 @@
 function send_hmi_value(index, value) {
     if(index > last_remote_index){
         updates[index] = value;
+
+        if(persistent_indexes.has(index)){
+            let varname = persistent_indexes.get(index);
+            console.log(varname+"="+value+"; max-age=3153600000");
+            document.cookie = varname+"="+value+"; max-age=3153600000";
+        }
+
         requestHMIAnimation();
         return;
     }