Always log 1 decimal (#890)

Co-authored-by: PanNwt <coolkaiken@web.de>
This commit is contained in:
PanNwt 2021-04-18 16:41:19 +02:00 • committed by GitHub
parent 0e0a51fb7f
commit 49450cf079
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -678,7 +678,7 @@ func (lp *LoadPoint) pvMaxCurrent(mode api.ChargeMode, sitePower float64) float6
deltaCurrent := powerToCurrent(-sitePower, lp.Phases)
targetCurrent := math.Max(math.Min(effectiveCurrent+deltaCurrent, float64(lp.MaxCurrent)), 0)
lp.log.DEBUG.Printf("max charge current: %.2gA = %.2gA + %.2gA (%.0fW @ %dp)", targetCurrent, effectiveCurrent, deltaCurrent, sitePower, lp.Phases)
lp.log.DEBUG.Printf("max charge current: %.1fA = %.1fA + %.1fA (%.0fW @ %dp)", targetCurrent, effectiveCurrent, deltaCurrent, sitePower, lp.Phases)
// in MinPV mode return at least minCurrent
if mode == api.ModeMinPV && targetCurrent < float64(lp.MinCurrent) {