effectiveCurrent returns the currently effective charging current
()
| 1239 | |
| 1240 | // effectiveCurrent returns the currently effective charging current |
| 1241 | func (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 |
| 1256 | func (lp *Loadpoint) elapsePVTimer() { |