From ab8878bbac13e895511eb3504675426c5dfd7b12 Mon Sep 17 00:00:00 2001 From: Leon Klingele Date: Thu, 10 Sep 2026 11:38:42 +0200 Subject: [PATCH] fix(modbus-cli): clarify -quantity flag help text The old text named both "register quantity" and "bytes" for the same value, causing confusion about units. -quantity counts 16-bit registers, not bytes. --- cmd/modbus-cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/modbus-cli/main.go b/cmd/modbus-cli/main.go index 7109e23..788da22 100644 --- a/cmd/modbus-cli/main.go +++ b/cmd/modbus-cli/main.go @@ -52,7 +52,7 @@ func main() { var ( register = flag.Int("register", -1, "") fnCode = flag.Int("fn-code", 0x03, "fn") - quantity = flag.Int("quantity", 2, "register quantity, length in bytes") + quantity = flag.Int("quantity", 2, "number of 16-bit registers to read/write (not bytes)") ignoreCRCError = flag.Bool("ignore-crc", false, "ignore crc") eType = flag.String("type-exec", "uint16", "") pType = flag.String("type-parse", "raw", "type to parse the register result. Use 'raw' if you want to see the raw bits and bytes. Use 'all' if you want to decode the result to different commonly used formats.")