|
@@ -953,6 +953,7 @@ def JCB(data): #json client input
|
|
|
|
|
|
jtxt = str(jtxt,"UTF-8")
|
|
|
cmds = json.loads(jtxt)
|
|
|
+ out = {}
|
|
|
for x in cmds:
|
|
|
|
|
|
cprint("json", x,type(x),color="yellow")
|
|
@@ -1017,14 +1018,16 @@ def JCB(data): #json client input
|
|
|
continue
|
|
|
|
|
|
Bdmx[DMX].exec_id(exec_id)
|
|
|
-
|
|
|
+ out[DMX] = {"flash":{},"fade":{},"fx":{},"flash_fx":{}}
|
|
|
if v is not None:
|
|
|
if "FLASH" in x:
|
|
|
|
|
|
- Bdmx[DMX].flash(target=v,ftime=ftime, clock=c,delay=delay)
|
|
|
+
|
|
|
+ out[DMX]["flash"] = {"target":v,"ftime":ftime, "clock":c,"delay":delay}
|
|
|
else:
|
|
|
|
|
|
- Bdmx[DMX].fade(target=v,ftime=ftime, clock=c,delay=delay)
|
|
|
+
|
|
|
+ out[DMX]["fade"] = {"target":v,"ftime":ftime, "clock":c,"delay":delay}
|
|
|
|
|
|
if type(fx2) is dict and fx2:
|
|
|
|
|
@@ -1062,9 +1065,11 @@ def JCB(data): #json client input
|
|
|
i.fx(xtype="off",clock=c)
|
|
|
|
|
|
if "FLASH" in x:
|
|
|
- Bdmx[DMX].flash_fx(xtype=xtype,size=size,speed=speed,invert=invert,width=width,start=start,offset=offset,base=base,clock=c,master=master_fx)
|
|
|
+
|
|
|
+ out[DMX]["flash_fx"] = {"xtype":xtype,"size":size,"speed":speed,"invert":invert,"width":width,"start":start,"offset":offset,"base":base,"clock":c,"master":master_fx}
|
|
|
else:
|
|
|
- Bdmx[DMX].fx(xtype=xtype,size=size,speed=speed,invert=invert,width=width,start=start,offset=offset,base=base,clock=c,master=master_fx)
|
|
|
+
|
|
|
+ out[DMX]["fx"] = {"xtype":xtype,"size":size,"speed":speed,"invert":invert,"width":width,"start":start,"offset":offset,"base":base,"clock":c,"master":master_fx}
|
|
|
|
|
|
elif type(fx) is str and fx:
|
|
|
ccm = str(DMX+1)+":"+fx
|
|
@@ -1076,6 +1081,47 @@ def JCB(data): #json client input
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+ for DMX in out:
|
|
|
+ line = out[DMX]
|
|
|
+
|
|
|
+ if out[DMX]["fx"]:
|
|
|
+ x = out[DMX]["fx"]
|
|
|
+ Bdmx[DMX].fx(xtype=x["xtype"]
|
|
|
+ ,size=x["size"]
|
|
|
+ ,speed=x["speed"]
|
|
|
+ ,invert=x["invert"]
|
|
|
+ ,width=x["width"]
|
|
|
+ ,start=x["start"]
|
|
|
+ ,offset=x["offset"]
|
|
|
+ ,base=x["base"]
|
|
|
+ ,clock=x["clock"]
|
|
|
+ ,master=["master"])
|
|
|
+ if out[DMX]["flash_fx"]:
|
|
|
+ x = out[DMX]["flash_fx"]
|
|
|
+ Bdmx[DMX].flash_fx(xtype=x["xtype"]
|
|
|
+ ,size=x["size"]
|
|
|
+ ,speed=x["speed"]
|
|
|
+ ,invert=x["invert"]
|
|
|
+ ,width=x["width"]
|
|
|
+ ,start=x["start"]
|
|
|
+ ,offset=x["offset"]
|
|
|
+ ,base=x["base"]
|
|
|
+ ,clock=x["clock"]
|
|
|
+ ,master=["master"])
|
|
|
+ if out[DMX]["flash"]:
|
|
|
+ x = out[DMX]["flash"]
|
|
|
+ Bdmx[DMX].flash(target=x["target"]
|
|
|
+ ,ftime=x["ftime"]
|
|
|
+ ,clock=x["clock"]
|
|
|
+ ,delay=x["delay"])
|
|
|
+ if out[DMX]["fade"]:
|
|
|
+ x = out[DMX]["fade"]
|
|
|
+ Bdmx[DMX].fade(target=x["target"]
|
|
|
+ ,ftime=x["ftime"]
|
|
|
+ ,clock=x["clock"]
|
|
|
+ ,delay=x["delay"])
|
|
|
+
|
|
|
|
|
|
|
|
|
except Exception as e:
|