EffectiveMaxPower returns the effective max power taking vehicle capabilities, phase scaling and load management power limits into account
()
| 229 | // EffectiveMaxPower returns the effective max power taking vehicle capabilities, |
| 230 | // phase scaling and load management power limits into account |
| 231 | func (lp *Loadpoint) EffectiveMaxPower() float64 { |
| 232 | lp.RLock() |
| 233 | defer lp.RUnlock() |
| 234 | |
| 235 | if circuitMaxPower := circuitMaxPower(lp.circuit); circuitMaxPower > 0 { |
| 236 | return min(lp.effectiveMaxPower(), circuitMaxPower) |
| 237 | } |
| 238 | |
| 239 | return lp.effectiveMaxPower() |
| 240 | } |
| 241 | |
| 242 | // effectiveMaxPower returns the effective max power taking vehicle capabilities and phase scaling into account |
| 243 | func (lp *Loadpoint) effectiveMaxPower() float64 { |
no test coverage detected