HuaweiAC: use active phases api (#11346)
This commit is contained in:
parent
a131678739
commit
f0048cd09f
1 changed files with 2 additions and 6 deletions
|
|
@ -84,13 +84,9 @@ func NewHuaweiACCharger(uri string, slaveID uint8) (api.Charger, error) {
|
|||
}
|
||||
|
||||
func (wb *HuaweiACCharger) setCurrent(current float64) error {
|
||||
var phases int
|
||||
// get (expectedly) active phases from loadpoint
|
||||
phases := 3
|
||||
if wb.lp != nil {
|
||||
phases = wb.lp.GetPhases()
|
||||
}
|
||||
if phases == 0 {
|
||||
phases = 3
|
||||
phases = wb.lp.ActivePhases()
|
||||
}
|
||||
|
||||
b := make([]byte, 4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue