micha 2 giorni fa
parent
commit
45797aa308
2 ha cambiato i file con 10 aggiunte e 3 eliminazioni
  1. 1 0
      lib/jsbc.py
  2. 9 3
      tkgui/FX3.py

+ 1 - 0
lib/jsbc.py

@@ -58,6 +58,7 @@ def JSCB(x,sock=None):
                     fixlib.encoder(MAIN.FIXTURES.fixtures,str(fix_nr),attr,xval=val,xfade=0,xdelay=0)#,blind=0)
                     OK = 1
                 elif "FX3" == msg["event"]:
+                    msg["VALUE"] = "DOOM"
                     cprint("FX3 OK",color="yellow")
                     OK = 1
                 elif "CLEAR" == msg["event"]:

+ 9 - 3
tkgui/FX3.py

@@ -137,12 +137,18 @@ class tk_event_fx():
                 if len(_fx3_jdata) <= ii: #extand list
                     _fx3_jdata.append({}) 
                 _fx3_jdata[ii][kk] = vv 
-                       
+            out = []
+            FIX=3001
+            z=0
             for i in _fx3_jdata: #info
-                i["event"] = "FX3"
+                #i["event"] = "FX3"
+                if i["ATTR"].strip():
+                    out.append( {"event":"FX3","DMX":"123","VALUE":"","FIX":str(FIX+z),"FX3":i} )
                 print(i)
+                z+=1
 
-            msg=json.dumps(_fx3_jdata).encode("utf-8")
+
+            msg=json.dumps(out).encode("utf-8")
             cprint("SEND FX3:",msg,color="green")
             cmd_client.send(msg)