disable flags for rdm

This commit is contained in:
Jens Ullmert 2022-07-27 16:04:43 +02:00
parent d91f985c7a
commit 8dd55b24f1

View File

@ -60,7 +60,7 @@ DMXSLP = 5000.0 #250.0 # 0µs (min) to 1s (max)
# Buffer for RDM
DMXRDM = "<initial>"
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