Skip to content

Commit

Permalink
Simplify formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Nov 20, 2019
1 parent d988130 commit ff7200d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions meters/rs485/inepro.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package rs485
import (
"encoding/binary"
"fmt"
"strconv"

. "github.com/volkszaehler/mbmd/meters"
)
Expand Down Expand Up @@ -113,7 +112,7 @@ func (p *IneproProducer) Initialize(client modbusClient, descriptor *DeviceDescr
}
// firmware
if bytes, err := client.ReadHoldingRegisters(0x4007, 2); err == nil {
descriptor.Version = strconv.FormatFloat(RTUIeee754ToFloat64(bytes), 'f', 2, 64)
descriptor.Version = fmt.Sprintf("%.2f", RTUIeee754ToFloat64(bytes))
}
// hardware
if bytes, err := client.ReadHoldingRegisters(0x4009, 2); err == nil {
Expand Down

0 comments on commit ff7200d

Please sign in to comment.