remove rdm for try

This commit is contained in:
Jens Ullmert 2022-07-27 15:39:01 +02:00
parent 86a96593fb
commit 3edb0717aa

View File

@ -102,7 +102,7 @@ def sendDMX(data):
while True: while True:
with serial.Serial('/dev/serial0', baudrate=250000, timeout=1, stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition with serial.Serial('/dev/serial0', baudrate=250000, timeout=1, stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition
DMXSER.cancel_read() #DMXSER.cancel_read()
# GPIO_18 to switch RS-485 driver (IC1) to TX-mode # GPIO_18 to switch RS-485 driver (IC1) to TX-mode
GPIO.output(18, GPIO.HIGH) GPIO.output(18, GPIO.HIGH)
@ -118,16 +118,17 @@ def sendDMX(data):
DMXSER.write(bytearray(DMXDATA)) DMXSER.write(bytearray(DMXDATA))
# GPIO_18 to switch RS-485 driver (IC1) to RX-mode # GPIO_18 to switch RS-485 driver (IC1) to RX-mode
DMXSER.reset_input_buffer() #DMXSER.reset_input_buffer()
GPIO.output(18, GPIO.LOW) GPIO.output(18, GPIO.LOW)
# Sleep between TX packages, use time to get RDM packages # Sleep between TX packages, use time to get RDM packages
DMXRDM = "" #DMXRDM = ""
DMXRDMFLAG = False #DMXRDMFLAG = False
DMXSER.timeout(5.0)
DMXSER.timeout(5)
#-----------------------------------------------------------------------DMXSER.timeout(DMXSLP / 1000.0) # between 0 - 1 sec #-----------------------------------------------------------------------DMXSER.timeout(DMXSLP / 1000.0) # between 0 - 1 sec
DMXRDM = DMXSER.readlines() #DMXRDM = DMXSER.readlines(hint=none)
DMXRDMFLAG = True #DMXRDMFLAG = True