diff --git a/Python/sock.py b/Python/sock.py index 45844f5..d14800f 100644 --- a/Python/sock.py +++ b/Python/sock.py @@ -102,7 +102,7 @@ def sendDMX(data): while True: 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.output(18, GPIO.HIGH) @@ -118,16 +118,17 @@ def sendDMX(data): DMXSER.write(bytearray(DMXDATA)) # GPIO_18 to switch RS-485 driver (IC1) to RX-mode - DMXSER.reset_input_buffer() + #DMXSER.reset_input_buffer() GPIO.output(18, GPIO.LOW) # Sleep between TX packages, use time to get RDM packages - DMXRDM = "" - DMXRDMFLAG = False - DMXSER.timeout(5.0) + #DMXRDM = "" + #DMXRDMFLAG = False + + DMXSER.timeout(5) #-----------------------------------------------------------------------DMXSER.timeout(DMXSLP / 1000.0) # between 0 - 1 sec - DMXRDM = DMXSER.readlines() - DMXRDMFLAG = True + #DMXRDM = DMXSER.readlines(hint=none) + #DMXRDMFLAG = True