Fix off-by-one that I forgot about

This commit is contained in:
Josh Deprez 2023-01-22 14:09:39 +11:00
parent 9fe38095fb
commit 9039f13ae6
Signed by: josh
SSH key fingerprint: SHA256:zZji7w1Ilh2RuUpbQcqkLPrqmRwpiCSycbF2EfKm6Kw

12
main.go
View file

@ -171,22 +171,22 @@ func scrape() error {
vals := make(map[uint16]float64) vals := make(map[uint16]float64)
start := time.Now() start := time.Now()
scrapeStart.SetToCurrentTime() scrapeStart.SetToCurrentTime()
if err := readRegs(vals, client, 5001, 24); err != nil { if err := readRegs(vals, client, 5000, 24); err != nil {
return err return err
} }
if err := readRegs(vals, client, 5031, 7); err != nil { if err := readRegs(vals, client, 5030, 7); err != nil {
return err return err
} }
if err := readRegs(vals, client, 5049, 1); err != nil { if err := readRegs(vals, client, 5048, 1); err != nil {
return err return err
} }
if err := readRegs(vals, client, 5083, 18); err != nil { if err := readRegs(vals, client, 5082, 18); err != nil {
return err return err
} }
if err := readRegs(vals, client, 5113, 1); err != nil { if err := readRegs(vals, client, 5112, 1); err != nil {
return err return err
} }
if err := readRegs(vals, client, 5144, 6); err != nil { if err := readRegs(vals, client, 5143, 6); err != nil {
return err return err
} }