Commit 91a1d74f76c64e7b35bfb10114e1a4a6ff351656

Authored by Stéphane Raimbault
1 parent 1c5d969f

Oops fix OR on RS485 settings (1c5d969)

Showing 1 changed file with 1 additions and 1 deletions
src/modbus-rtu.c
@@ -916,7 +916,7 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode) @@ -916,7 +916,7 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
916 return -1; 916 return -1;
917 } 917 }
918 // Set 918 // Set
919 - rs485conf.flags = SER_RS485_ENABLED; 919 + rs485conf.flags |= SER_RS485_ENABLED;
920 if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) { 920 if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
921 return -1; 921 return -1;
922 } 922 }