svghmi/svghmi.c
branchsvghmi
changeset 3271 561dbd1e3e04
parent 3270 38f7122ccbf9
child 3273 08a5a019bed2
--- a/svghmi/svghmi.c	Wed Jul 07 16:31:13 2021 +0200
+++ b/svghmi/svghmi.c	Fri Jul 09 15:47:43 2021 +0200
@@ -242,10 +242,13 @@
 }
 
 /* PYTHON CALLS */
+int svghmi_wait(void){
+
+    SVGHMI_SuspendFromPythonThread();
+}
+
 int svghmi_send_collect(uint32_t session_index, uint32_t *size, char **ptr){
 
-    SVGHMI_SuspendFromPythonThread();
-
     if(continue_collect) {
         int res;
         sbufidx = HMI_HASH_SIZE;
@@ -275,6 +278,12 @@
     subscribe = 2
 } cmd_from_JS;
 
+int svghmi_reset(uint32_t session_index){
+    reset_session_index = session_index;
+    traverse_hmi_tree(reset_iterator);
+    return 1;
+}
+
 // Returns :
 //   0 is OK, <0 is error, 1 is heartbeat
 int svghmi_recv_dispatch(uint32_t session_index, uint32_t size, const uint8_t *ptr){