diff --git a/Python/sock.py b/Python/sock.py index d0d0d16..a239e67 100644 --- a/Python/sock.py +++ b/Python/sock.py @@ -60,7 +60,7 @@ DMXSLP = 5000.0 #250.0 # 0µs (min) to 1s (max) # Buffer for RDM DMXRDM = "" -DMXRDMFLAG = False # 1 for radlines() is active to buffer rdm packages +DMXRDMFLAG = True # 1 for radlines() is active to buffer rdm packages @@ -117,29 +117,19 @@ def sendDMX(data): # send complete data array DMXSER.write(bytearray(DMXDATA)) - # we have to send a string - rtn = "" - - # dont have to send DMXDATA[0], this is the start code - for index in range(1, len(DMXDATA)): - rtn += (str(index) + "=" + str(DMXDATA[index]) + "; ") - - # give debug feedback - print("output ", rtn) - # GPIO_18 to switch RS-485 driver (IC1) to RX-mode DMXSER.reset_input_buffer() GPIO.output(18, GPIO.LOW) # Sleep between TX packages, use time to get RDM packages - DMXRDM = "" - DMXRDMFLAG = False + #DMXRDM = "" + #DMXRDMFLAG = False time.sleep(2) #-----------------------------------------------------------------------DMXSER.timeout(DMXSLP / 1000.0) # between 0 - 1 sec DMXRDM = DMXSER.read(size=10) print("input", DMXRDM) - DMXRDMFLAG = True + #DMXRDMFLAG = True