Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jun 24, 2024
1 parent c3b5cb8 commit 806d851
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions charger/charger.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ func NewConfigurableFromConfig(other map[string]interface{}) (api.Charger, error

// decorate measurements
powerG, energyG, currentsG, voltagesG, powersG, err := meter.BuildMeasurements(cc.Power, cc.Energy, cc.Currents, cc.Voltages, cc.Powers)
if err != nil {
return nil, err
}

return decorateCustom(c, maxcurrentmillis, identify, phases1p3p, wakeup, soc, powerG, energyG, currentsG, voltagesG, powersG), nil
}
Expand Down
4 changes: 1 addition & 3 deletions meter/mbmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,9 @@ func (m *ModbusMbmd) buildPhaseProviders(readings []string) (func() (float64, fl
return nil, fmt.Errorf("invalid measurement [%d]: %s", idx, reading)
}

c := func() (float64, error) {
phases[idx] = func() (float64, error) {
return m.floatGetter(opCurrent)
}

phases[idx] = c
}

return CollectPhaseProviders(phases), nil
Expand Down

0 comments on commit 806d851

Please sign in to comment.