Skip to content

Commit

Permalink
Fix parameter on modbus read register
Browse files Browse the repository at this point in the history
  • Loading branch information
vitbaq committed Nov 24, 2020
1 parent 36b5e3a commit 9f1f46b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iface-modbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ int iface_modbus_read_data(int reg_addr, int bit_offset, knot_value_type *out)
tmp.val_byte |= byte_tmp[i] << i;
break;
case TYPE_U16:
rc = modbus_read_registers(modbus_ctx, reg_addr, 2,
rc = modbus_read_registers(modbus_ctx, reg_addr, 1,
&tmp.val_u16);
break;
case TYPE_U32:
Expand Down

0 comments on commit 9f1f46b

Please sign in to comment.