EffectivePlanTime returns the effective plan time
()
| 128 | |
| 129 | // EffectivePlanTime returns the effective plan time |
| 130 | func (lp *Loadpoint) EffectivePlanTime() time.Time { |
| 131 | lp.RLock() |
| 132 | defer lp.RUnlock() |
| 133 | if lp.socBasedPlanning() { |
| 134 | ts, _, _ := lp.nextVehiclePlan() |
| 135 | return ts |
| 136 | } |
| 137 | |
| 138 | ts, _ := lp.getPlanEnergy() |
| 139 | return ts |
| 140 | } |
| 141 | |
| 142 | // SocBasedPlanning returns true if soc based planning is enabled |
| 143 | func (lp *Loadpoint) SocBasedPlanning() bool { |
no test coverage detected