24 lines
725 B
Diff
24 lines
725 B
Diff
|
--- a/src/modbus.c 2011-03-28 14:51:41.000000000 +0200
|
||
|
+++ b/src/modbus.c 2011-03-28 14:52:12.000000000 +0200
|
||
|
@@ -293,10 +293,8 @@
|
||
|
host->node, host->port);
|
||
|
|
||
|
modbus_init_tcp (&host->connection,
|
||
|
- /* host = */ host->node);
|
||
|
-#if 0
|
||
|
+ /* host = */ host->node,
|
||
|
/* port = */ host->port);
|
||
|
-#endif
|
||
|
|
||
|
status = modbus_connect (&host->connection);
|
||
|
if (status != 0)
|
||
|
@@ -366,7 +367,7 @@
|
||
|
{
|
||
|
status = read_holding_registers (&host->connection,
|
||
|
/* slave = */ slave->id, /* start_addr = */ data->register_base,
|
||
|
- /* num_registers = */ values_num, /* buffer = */ values);
|
||
|
+ /* num_registers = */ values_num, /* buffer = */ (uint16_t*)values);
|
||
|
if (status > 0)
|
||
|
break;
|
||
|
|