|
@@ -100,7 +100,7 @@ def cprint(*text,color="blue",space=" ",end="\n"):
|
|
print(txt,end=end)
|
|
print(txt,end=end)
|
|
#return txt
|
|
#return txt
|
|
|
|
|
|
-def artnet_loop():
|
|
|
|
|
|
+def artnet_loop(single=0):
|
|
#artnet = ANN.ArtNetNode(to="127.0.0.1",port=6555,univ=12)
|
|
#artnet = ANN.ArtNetNode(to="127.0.0.1",port=6555,univ=12)
|
|
#artnet = ANN.ArtNetNode(to="127.0.0.1",port=6555,univ=0)
|
|
#artnet = ANN.ArtNetNode(to="127.0.0.1",port=6555,univ=0)
|
|
artnet = ANN.ArtNetNode(to="10.10.10.255",univ=0)
|
|
artnet = ANN.ArtNetNode(to="10.10.10.255",univ=0)
|
|
@@ -113,6 +113,8 @@ def artnet_loop():
|
|
#artnet._test_frame()
|
|
#artnet._test_frame()
|
|
artnet.next()
|
|
artnet.next()
|
|
time.sleep(0.001)
|
|
time.sleep(0.001)
|
|
|
|
+ if single:
|
|
|
|
+ break
|
|
|
|
|
|
|
|
|
|
class CLOCK():
|
|
class CLOCK():
|
|
@@ -150,6 +152,7 @@ class CLOCK_REAL():
|
|
print( "runtime:{:0.2f} tick_timer:{:0.2f} drift:{:0.2f}".format(run_time,tick_time,run_time-tick_time))
|
|
print( "runtime:{:0.2f} tick_timer:{:0.2f} drift:{:0.2f}".format(run_time,tick_time,run_time-tick_time))
|
|
def loop(self):
|
|
def loop(self):
|
|
pass
|
|
pass
|
|
|
|
+
|
|
#clock = CLOCK()
|
|
#clock = CLOCK()
|
|
clock = CLOCK_REAL()
|
|
clock = CLOCK_REAL()
|
|
if __run_main:
|
|
if __run_main:
|
|
@@ -1299,11 +1302,11 @@ def JCB(data,sock=None): #json client input
|
|
|
|
|
|
c = clock.time()
|
|
c = clock.time()
|
|
c = float(c)
|
|
c = float(c)
|
|
- out = {}
|
|
|
|
|
|
|
|
process_flash(jdatas)
|
|
process_flash(jdatas)
|
|
calc_jitter(jdatas,t_start)
|
|
calc_jitter(jdatas,t_start)
|
|
|
|
|
|
|
|
+ out = {}
|
|
for cmds in jdatas:
|
|
for cmds in jdatas:
|
|
#master_fx = MASTER_FX()
|
|
#master_fx = MASTER_FX()
|
|
out = _parse_cmds(cmds,clock=c)
|
|
out = _parse_cmds(cmds,clock=c)
|
|
@@ -1326,8 +1329,9 @@ def JCB(data,sock=None): #json client input
|
|
line_size += sys.getsizeof(row)
|
|
line_size += sys.getsizeof(row)
|
|
|
|
|
|
#print("_id",_id)
|
|
#print("_id",_id)
|
|
- Admx = row["DMXCH"]
|
|
|
|
- #print("Admx",Admx)
|
|
|
|
|
|
+ Admx = row.get("DMXCH",-44) #["DMXCH"]
|
|
|
|
+ if Admx == -44:
|
|
|
|
+ print("Admx",Admx)
|
|
|
|
|
|
if "attr" in row:
|
|
if "attr" in row:
|
|
if row["attr"] not in attr_count:
|
|
if row["attr"] not in attr_count:
|