MCPcopy Create free account
hub / github.com/evcc-io/evcc / effectiveCurrent

Method effectiveCurrent

core/loadpoint.go:1241–1253  ·  view source on GitHub ↗

effectiveCurrent returns the currently effective charging current

()

Source from the content-addressed store, hash-verified

1239
1240// effectiveCurrent returns the currently effective charging current
1241func (lp *Loadpoint) effectiveCurrent() float64 {
1242 if !lp.charging() {
1243 return 0
1244 }
1245
1246 // adjust actual current for vehicles like Zoe where it remains below target
1247 if lp.chargeCurrents != nil {
1248 cur := max(lp.chargeCurrents[0], lp.chargeCurrents[1], lp.chargeCurrents[2])
1249 return min(cur+2.0, lp.offeredCurrent)
1250 }
1251
1252 return lp.offeredCurrent
1253}
1254
1255// elapsePVTimer puts the pv enable/disable timer into elapsed state
1256func (lp *Loadpoint) elapsePVTimer() {

Callers 1

pvMaxCurrentMethod · 0.95

Calls 1

chargingMethod · 0.95

Tested by

no test coverage detected