Skip to content

Commit cff40d3

Browse files
authored
fix type error
1 parent a4d4743 commit cff40d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/loadpoint.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,12 +1478,12 @@ func (lp *Loadpoint) pvMaxCurrent(mode api.ChargeMode, sitePower, batteryBoostPo
14781478
if mode == api.ModePV {
14791479
if lp.enabled {
14801480
now := lp.clock.Now()
1481-
projectedSitePower := sitePower - Voltage * (effectiveCurrent - max(minCurrent, targetCurrent)) * activePhases
1481+
projectedSitePower := sitePower - Voltage * (effectiveCurrent - max(minCurrent, targetCurrent)) * float64(activePhases)
14821482

14831483
if lp.hasPhaseSwitching() && !lp.phaseTimer.IsZero() {
14841484
// calculate site power after a phase switch from activePhases phases -> 1 phase
14851485
// notes: activePhases can be 1, 2 or 3 and phaseTimer can only be active if lp current is already at minCurrent
1486-
projectedSitePower -= Voltage * minCurrent * (activePhases-1)
1486+
projectedSitePower -= Voltage * minCurrent * float64(activePhases-1)
14871487
}
14881488

14891489
// kick off disable sequence

0 commit comments

Comments
 (0)