b5f1d5b071
This enables the modbus plugin of collectd and patches it so it works with the current version of libmodbus Signed-off-by: Daniel Golle <daniel.golle@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/packages@26346 3c298f89-4303-0410-b956-a3cf2f4a3e73
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;
|
|
|