Minor fixes

This commit is contained in:
andig 2020-04-21 11:23:29 +02:00
parent 0e352c77d7
commit 6cbfc55902

View file

@ -10,6 +10,7 @@ import (
"github.com/volkszaehler/mbmd/meters/sunspec"
)
// Modbus implements modbus RTU and TCP access
type Modbus struct {
log *api.Logger
conn meters.Connection
@ -130,7 +131,9 @@ func (m *Modbus) FloatGetter() (float64, error) {
res, err = dev.QueryOp(m.conn.ModbusClient(), m.op.IEC61850)
}
m.log.TRACE.Printf("%+v", res)
if err == nil {
m.log.TRACE.Printf("%+v", res)
}
return res.Value, err
}