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

Method fastCharging

core/loadpoint.go:1341–1362  ·  view source on GitHub ↗

fastCharging scales to 3p if available and sets maximum current

()

Source from the content-addressed store, hash-verified

1339
1340// fastCharging scales to 3p if available and sets maximum current
1341func (lp *Loadpoint) fastCharging() error {
1342 if lp.hasPhaseSwitching() {
1343 phases := 3
1344
1345 // load management limit active
1346 if lp.circuit != nil {
1347 minPower3p := currentToPower(lp.effectiveMinCurrent(), 3)
1348 if powerLimit := lp.circuit.ValidatePower(lp.chargePower, minPower3p); powerLimit < minPower3p {
1349 phases = 1
1350 lp.log.DEBUG.Printf("fast charging: scaled to 1p to match %.0fW available circuit power", powerLimit)
1351 }
1352 }
1353
1354 // ignore api.ErrNotAvailable: the phase switch could not be performed
1355 // right now, continue with the current phase configuration
1356 if err := lp.scalePhasesIfAvailable(phases); err != nil && !errors.Is(err, api.ErrNotAvailable) {
1357 return err
1358 }
1359 }
1360
1361 return lp.setLimit(lp.effectiveMaxCurrent())
1362}
1363
1364// minCharging scales to 1p if available and sets minimum current
1365func (lp *Loadpoint) minCharging() error {

Callers 2

UpdateMethod · 0.95

Calls 8

hasPhaseSwitchingMethod · 0.95
effectiveMinCurrentMethod · 0.95
setLimitMethod · 0.95
effectiveMaxCurrentMethod · 0.95
currentToPowerFunction · 0.85
PrintfMethod · 0.80
ValidatePowerMethod · 0.65

Tested by 1