From 91a1d74f76c64e7b35bfb10114e1a4a6ff351656 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= <stephane.raimbault@gmail.com>
Date: Thu, 26 Oct 2017 11:10:31 +0200
Subject: [PATCH 2/2] Oops fix OR on RS485 settings (1c5d969)

---
 src/modbus-rtu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c
index f2911d6..190298e 100644
--- a/src/modbus-rtu.c
+++ b/src/modbus-rtu.c
@@ -916,7 +916,7 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
                 return -1;
             }
             // Set
-            rs485conf.flags = SER_RS485_ENABLED;
+            rs485conf.flags |= SER_RS485_ENABLED;
             if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
                 return -1;
             }
-- 
2.21.0

