Skip to content

Commit

Permalink
drivers/apc_modbus.c: report (in debug traces) whether USB-capable li…
Browse files Browse the repository at this point in the history
…bmodbus was used to build this driver [networkupstools#2666]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Nov 12, 2024
1 parent d3b6502 commit 85ad1cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/apc_modbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,10 @@ void upsdrv_makevartable(void)
#endif /* defined NUT_MODBUS_HAS_USB */

#if defined NUT_MODBUS_HAS_USB
upsdebugx(1, "This build of the driver is USB-capable; also Serial and TCP Modbus RTU are supported");
addvar(VAR_VALUE, "porttype", "Modbus port type (serial, tcp, usb, default=usb)");
#else
upsdebugx(1, "This build of the driver is not USB-capable, only Serial and TCP Modbus RTU are supported");
addvar(VAR_VALUE, "porttype", "Modbus port type (serial, tcp, default=serial)");
#endif /* defined NUT_MODBUS_HAS_USB */
addvar(VAR_VALUE, "slaveid", "Modbus slave id (default=1)");
Expand Down

0 comments on commit 85ad1cb

Please sign in to comment.