serialposix: _set_rs485_mode() tries to read non-existing attribute, fixes 85
- update changelog
diff --git a/serial/serialposix.py b/serial/serialposix.py
index ae113c2..2dca984 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -144,8 +144,8 @@
buf[0] |= SER_RS485_RTS_AFTER_SEND
else:
buf[0] &= ~SER_RS485_RTS_AFTER_SEND
- buf[1] = int(rs485_settings.delay_rts_before_send * 1000)
- buf[2] = int(rs485_settings.delay_rts_after_send * 1000)
+ buf[1] = int(rs485_settings.delay_before_tx * 1000)
+ buf[2] = int(rs485_settings.delay_before_rx * 1000)
else:
buf[0] = 0 # clear SER_RS485_ENABLED
fcntl.ioctl(self.fd, TIOCSRS485, buf)