diff --git a/main.go b/main.go index 74085ec..fcfc259 100644 --- a/main.go +++ b/main.go @@ -134,7 +134,7 @@ func readRegs(client modbus.Client, start, qty uint16) error { return fmt.Errorf("read input registers %d-%d: %v", start+1, start+qty, err) } if len(data) != int(2*qty) { - return fmt.Errorf("reading input registers %d-%d: len(data) = %d != %d = 2*qty", start+1, start+qty, len(data), 2*qty) + return fmt.Errorf("read input registers %d-%d: len(data) = %d != %d = 2*qty", start+1, start+qty, len(data), 2*qty) } for addr, reg := range sungrowInputRegs { if addr <= start || addr > start+qty { @@ -146,7 +146,7 @@ func readRegs(client modbus.Client, start, qty uint16) error { log.Printf("Couldn't parse input register data at %d, skipping: %v", addr, err) continue } - return fmt.Errorf("parsing input register data at %d: %v", addr, err) + return fmt.Errorf("parse input register data at %d: %v", addr, err) } //fmt.Printf("%s: %v %s\n", reg.name, val, reg.unit) lastValues[addr] = val