Commit a482dcc95000fef87a4f43b8491383882ebdf040

Authored by Stéphane Raimbault
1 parent d8a5e555

Fix missing FLUSH_OR_RECONNECT_ON_ERROR in RTU mode

Showing 1 changed file with 1 additions and 0 deletions
modbus/modbus.c
... ... @@ -1330,6 +1330,7 @@ void modbus_init_rtu(modbus_param_t *mb_param, const char *device,
1330 1330 mb_param->type_com = RTU;
1331 1331 mb_param->header_length = HEADER_LENGTH_RTU;
1332 1332 mb_param->checksum_length = CHECKSUM_LENGTH_RTU;
  1333 + mb_param->error_handling = FLUSH_OR_RECONNECT_ON_ERROR;
1333 1334 }
1334 1335  
1335 1336 /* Initializes the modbus_param_t structure for TCP.
... ...