Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/src/man/man9/hm2_modbus.9.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ PktUART ports.
parameter. Example: `ports="hm2_7i96s.0.pktuart.0","hm2_5i25.0.pktuart.2"`
*mbccbs* [default: <empty>]::
A comma separated list of "Modbus Command Control Binary" (MBCCB) file paths
to use for each PktUART port as specified in the *ports* parameter. The path
should be an absolute path to prevent nasty surprises.
Example: `mbccbs="/path/to/rly-and-spindle.mbccb","/path/to/lightsparks.mbccb"`
to use for each PktUART port as specified in the *ports* parameter.
Example: `mbccbs="rly-and-spindle.mbccb","lightsparks.mbccb"`
*debug* [default: -1]::
Set the message level of the running process. The message level is set
if *debug* is set to a positive value between 0 and 5, where 0 means no
Expand Down
9 changes: 3 additions & 6 deletions src/hal/drivers/mesa-hostmot2/hm2_modbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ RTAPI_MP_ARRAY_STRING(ports, MAX_PORTS, "PktUART HAL names");
/*
* The Modbus configuration and command structure files for each PktUART
* interface to be read by the hm2_modbus module. This should be a list of
* absolute path file names like:
* files="/usr/share/linuxcnc/modbus/spindle.mbccb","/home/test/xyz.mbccb"
* path file names like:
* files="spindle.mbccb","xyz.mbccb"
*/
static char *mbccbs[MAX_PORTS];
RTAPI_MP_ARRAY_STRING(mbccbs, MAX_PORTS, "Binary Modbus configuration and command sequence absolute path file names");
RTAPI_MP_ARRAY_STRING(mbccbs, MAX_PORTS, "Binary Modbus configuration and command sequence path file names");

/*
* Set the message level for debugging purpose. This has the (side-)effect that
Expand Down Expand Up @@ -2749,9 +2749,6 @@ int rtapi_app_main(void)
retval = -EINVAL;
goto errout;
}
if('/' != mbccbs[i][0]) {
MSG_ERR("%s: warning: The 'mbccb' file path '%s' for instance %d in 'mbccbs' argument is not absolute\n", inst->name, mbccbs[i], i);
}

if((retval = load_mbccb(inst, mbccbs[i])) < 0) {
// Messages printed in load function
Expand Down
Loading