diff --git a/Python/sock.py b/Python/sock.py index 3ce6f61..9ea00f2 100644 --- a/Python/sock.py +++ b/Python/sock.py @@ -102,7 +102,7 @@ def sendDMX(data): global DMXSLP while True: - with serial.Serial('/dev/serial0', baudrate=250000, timeout=DMXSLP, stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition + with serial.Serial('/dev/serial0', baudrate=250000, timeout=(DMXSLP/1000.0), stopbits=serial.STOPBITS_TWO, bytesize=8) as DMXSER:# UART configuration and definition #DMXSER.cancel_read() # GPIO_18 to switch RS-485 driver (IC1) to TX-mode @@ -125,7 +125,7 @@ def sendDMX(data): GPIO.output(18, GPIO.LOW) # Sleep between TX packages, use time to get RDM packages - print("start read") + print("start read for ", (DMXSLP/1000.0), "ms") DMXRDM = DMXSER.read(400) print("end read")